Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Generalised Structural Equation Modelling

    Greetings. Please I am facing a regression issue and I need your help.

    I am using gsem to estimate a oprobit model. I have among my covariate latent and endogenous variables.

    The issue is that the endogenous explanatory variable is a proportion.

    What I did is to first estimate the proportion under glm with binomial family and logit link function. I then predicted the residual and add the residual in the oprobit model with the proportion variable as well. ( This is my understanding of the control function approach).

    Please, the question I have is what should I do if the coefficient of the residual is significant (meaning the covariate is really endogenous). Is this procedure correct? If not, what is the right thing to do please?

    I tried to combine the proportion model ( using binomial as family and logit as link) with the oprobit estimation under gsem but I got lot of dots in the stata output. That's why I used the control function approach.

    Please, I also want to know if ithere is a way to run a fractional logit under gsem ?

    I am working with a cross sectional data.

    Thank you for considering my request

  • #2
    Dear Stata Experts,

    Greetings. Please I'll like to find out if it makes sense to consider the fractional logit under gsem as running gsem with gamma family and link function log with the constraints on the log of the scale parameter to be 0?

    Thank you.
    Best regards,
    Sylvie

    Comment


    • #3
      You didn't get a quick answer. You'll increase your chances of a useful answer by following the FAQ on asking questions - provide Stata code in code delimiters, Stata output, and sample data using dataex.

      You might get a better response by letting us see more precisely what you're doing and what is the problem.

      Comment


      • #4
        Dear Stata Experts,

        Greetings. Thank you for your response and Sorry for my previous posts that were not clear.

        I am writing a report and I have two objectives

        The following are the different equations I would like to estimate

        Objective 1
        E(Y1/x) = G (a + b1X1+ b2X2+ b3 X1X2+…+bmXm) where Y1 is a proportion ( percentage losses)

        I run the code below to estimate Y1
        glm Y1 X1 X2 X1#X2….Xm, family (binomial) link ( logit) vce(robust). The results were quite Good

        Objective2
        y2* = Y1b1+ b2X2+ b3 X1X2+…+bkXk, y2 the observed ordinal variable (food security actually). Y1 is endogenous in this model ( some variables of the first equation are not included here and some variables here are not in the first equation as well)

        To fit this model I run the following code:
        gsem (Y1 <- X1 X2 X1#X2 ….Xm, family (binomial) link ( logit) vce(robust) ) ( y2 <- X1 X2 X1#X2….Xk M1[village], oprobit). Here village is treated as latent variable

        I got this warning message
        Could not calculate numerical derivatives -- discontinuous region with missing values encountered.
        I think I got this warning message because when I run
        gsem (Y1 <- X1 X2 X1#X2….Xm, family (binomial) link (logit) vce(robust) ) , I got missing values for every statistics, Std. Err. z P>|z| [95% Conf. Interval] , except for coefficients.

        Then, I tried the control function approach

        I run glm Y1 X1 X2 X1#X2…. Xm, family (binomial) link (logit) vce (robust).
        predict resid, a
        gsem ( y2 <- Y1 resid X1 X2 X1#X2….Xk M1[village], oprobit)

        My first question was to find out if the control function approach done in that way is correct?
        What should I do when the coefficient of resid is significant?

        I later realised that the ‘gamma’ family work with non-negative real value (ranges from zero to infinity) and continuous response model.
        Because my variable is defined between 0 and 1, I wonder if:

        glm Y1 X1 X2 X1#X2….Xm, family (binomial) link ( logit) vce(robust)) is equivalent to

        gsem (Y1 <- X1 X2 X1#X2….Xm , gamma), noestimate
        constraint 1 _b[Y1_logs:_cons]=0
        gsem (Y1 <- X1 X2 X1#X2….Xm , gamma), constraints ( 1)

        Hence my second post about how to run the fractional logit under gsem.

        Thank you.
        Best Regards,
        Sylvie
        Last edited by Sylvie Koffi; 09 Jun 2017, 23:11.

        Comment

        Working...
        X