Announcement

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

  • Survey wights_urgent

    Hello,
    I am really stuck in estimating a gsem model in which there are 5 equations.
    I do not have problem to get the estimated parameters without survey weights.
    Unfortunatly when I want to use suevy weight for the estimation by the command svy: gsem(modle1)(model2)...,, Stata does not run and gives me the following message:

    quadcross(): 3200 conformability error
    mean(): - function returned error
    _gsem_build__start_cons_yinfo(): - function returned error
    _gsem_build__start_cons(): - function returned error
    _gsem_build__start(): - function returned error
    _gsem_build(): - function returned error
    _gsem_parse(): - function returned error
    st_gsem_parse(): - function returned error
    <istmt>: - function returned error
    an error occurred when svy executed gsem
    r(3200);

    So, Is it possible I first transform the original data by using survey weights and then estimate the model with these new data? for that, how should I transform data by the weight? Should I multiply weights with the data? Is there any one who can help me, please. Or is there any sources that descries how I can do the right data transformation. PLease. it is very urgent.I really appreciate your help.
    Best
    Hossein Kavand

  • #2
    To quote the Statalist FAQ:
    Similarly, as you have a good question, just ask it. We don't need or want detailed explanations of how much you need help, how urgent it is for you, or how grateful you will be for attention.
    If you only have weights, you try to work with [pweight=weight] instead of the svy: prefix. Also take a close look at your weights: are there any weird values?
    ---------------------------------
    Maarten L. Buis
    University of Konstanz
    Department of history and sociology
    box 40
    78457 Konstanz
    Germany
    http://www.maartenbuis.nl
    ---------------------------------

    Comment


    • #3
      Thank you for your reply. As you oriented I used [pweight=weight] , but I still got he same errors.
      In my gsem model there are 5 equations in which two of them are like heckman sample selection models. Therefore, for two out of 5 question some the observation for their dependent variable has been considered as missing information, `.`. I think this missing information does not allowed the weights to be applied properly using svy or [pweight=weight] . Because of that I think if I transform the original data from the beginning by using the survey weights, then I can get the result with this new created data. THis is because without survy weight I did not have problem to estimate the coefficients.Please let me know if there is any way for help

      Comment


      • #4
        Hossein:
        as per -help r(3200)- at least one of your matrix has a conformability problem; missingness may be the culprit.
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment


        • #5
          Thank you Carlo. Since in my model I should take care of selection effect, for example, if a firm applied for any credit? if Yes, then the business credit variable has a number, if No, for the firm the business credit would be missing. Business credit is a dependent variable for the second equation in the system of equation (gsem), Therefore, I cannot get rid of the dependent variable with missing values in the system. From here, I thought It might be a better way that I understand the logic of survey weight regarding to how they are applied in the regression. Then I would be able to transform my data at the beginning by using weights and creating new data set to be estimated by gsem command. (I did not have any problem to estimate the model without using wights so if I transfer data in the right way, I would not have problem with estimating the system again.) Please guide me to some ways or sources that show me how svy: command is transfers original data please.

          Comment


          • #6
            From here, I thought It might be a better way that I understand the logic of survey weight regarding to how they are applied in the regression. Then I would be able to transform my data at the beginning by using weights and creating new data set to be estimated by gsem command. [...] Please guide me to some ways or sources that show me how svy: command is transfers original data please.
            This is probably rather complex. The data transformation for a simple linear regression model with aweights is discussed here. I would guess that a similar thing with pweights might be possible but probably trickier. Whether and how this translates to the problem of fitting a model with gsem to survey data, I cannot tell.

            Anyway, this error message does not seem to be something that StataCorp expected, as they typically do not let you see some detailed error messages from Mata (which are helpful for the developers for debugging, but at best confusing for most users). I would take this to Stata tech-support and ask for clarification and help.

            Best
            Daniel

            Comment


            • #7
              Dear Daniel, Thank you so much for your consideration. Please let me know if you need any further information. I really need to solve this issue and I really appreciate your time and help.

              Comment

              Working...
              X