Announcement

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

  • Using suest and test after multiple imputation

    Hi all,

    I'm trying to figure out a way to use the suest and test command (or something similar) after multiple imputation.

    I am running some stratified multiple regression models where I am using the suest and the posestimation "test" command to see if the relationship between my DV and IV is significantly different across my two subsamples (first-gen students and continuing-gen students). Prior to multiple imputation, I had been using the suest command followed by the test command to accomplish this with the following code:
    Code:
    logit everenrollcollege bioguardian singleparent guardianonly twobioparent if firstgen==0
    est sto cgen
    logit everenrollcollege bioguardian singleparent guardianonly twobioparent if firstgen==1
    est sto fgen
    suest cgen fgen, vce(cluster schoolid) cformat(%9.3f)
    test [cgen_everenrollcollege]singleparent=[fgen_everenrollcollege]singleparent
    This gives me what I'm looking for with no issues. However, I used multiple imputation on this dataset to deal with missing cases and I'm trying to accomplish the same thing as above, just with imputed data. I still want to test to see if the relationship between my DV and IV is significantly different across different subsamples. When I run the following code, I get an error message from Stata:

    Code:
    mi estimate: ​​​​​​​logit everenrollcollege bioguardian singleparent guardianonly twobioparent if firstgen==0
    est sto cgen
    mi estimate: logit everenrollcollege bioguardian singleparent guardianonly twobioparent if firstgen==1
    est sto fgen
    mi estimate: suest cgen fgen, vce(cluster schoolid) cformat(%9.3f)
    The error message I'm getting is:
    mi estimate: command not supported
    suest is not officially supported by mi estimate; see mi estimation for a list of Stata estimation commands that are supported by mi estimate. You
    can use option cmdok to allow estimation anyway.
    r(198);

    I have tried to use the cmdok option and I get another error message that states:
    impossible to retrieve e(b) and e(V_modelbased) in cgen2
    an error occurred when mi estimate executed suest on m=1
    r(198);

    I essentially just need to be able to test to see whether the differences in the coefficients for the "singleparent" variable between continuing-gen and first-gen students are significant. Any help on this is much appreciated!


    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input float(firstgen everenrollcollege bioguardian singleparent guardianonly twobioparent)
    1 1 0 0 0 1
    1 1 0 0 0 1
    1 1 0 1 0 0
    1 1 0 0 0 1
    1 0 0 1 0 0
    0 1 0 0 0 1
    1 1 0 0 0 1
    1 1 0 0 0 1
    0 1 1 0 0 0
    1 1 1 0 0 0
    0 1 0 0 0 1
    0 1 0 1 0 0
    1 0 0 0 0 1
    0 1 0 0 0 1
    1 1 0 0 0 1
    1 0 0 1 0 0
    1 1 0 0 0 1
    1 1 0 0 0 1
    0 1 0 0 1 0
    1 1 0 0 0 1
    1 1 0 0 0 1
    1 1 0 0 0 1
    1 0 1 0 0 0
    1 0 0 1 0 0
    1 1 0 0 0 1
    0 0 1 0 0 0
    1 1 0 0 0 1
    1 1 0 1 0 0
    1 1 0 0 0 1
    1 0 1 0 0 0
    1 1 0 1 0 0
    1 1 0 1 0 0
    1 0 0 1 0 0
    1 1 0 0 0 1
    1 0 1 0 0 0
    1 1 1 0 0 0
    0 1 0 0 0 1
    1 1 0 1 0 0
    1 1 0 1 0 0
    0 0 0 1 0 0
    1 1 0 1 0 0
    1 0 0 1 0 0
    0 1 0 1 0 0
    1 0 0 1 0 0
    1 1 0 0 1 0
    1 0 0 0 0 1
    1 1 0 1 0 0
    0 1 1 0 0 0
    1 0 1 0 0 0
    1 0 0 1 0 0
    1 1 0 1 0 0
    1 1 0 1 0 0
    1 1 1 0 0 0
    1 1 0 1 0 0
    1 1 0 1 0 0
    1 1 0 0 0 1
    1 0 1 0 0 0
    1 0 0 0 1 0
    1 0 0 1 0 0
    0 1 0 0 0 1
    1 1 0 0 0 1
    1 0 1 0 0 0
    0 1 0 0 0 1
    0 1 0 1 0 0
    0 1 0 0 0 1
    0 1 0 0 0 1
    1 1 0 0 0 1
    0 1 0 0 0 1
    0 1 0 0 0 1
    1 0 0 0 0 1
    1 1 0 1 0 0
    0 1 0 0 0 1
    0 1 0 0 0 1
    1 1 1 0 0 0
    0 1 0 1 0 0
    1 1 0 0 0 1
    0 0 0 0 0 1
    1 1 0 0 0 1
    1 1 0 0 0 1
    0 1 0 0 0 1
    0 1 0 0 0 1
    0 1 0 0 0 1
    0 1 0 0 0 1
    1 1 0 0 0 1
    1 1 1 0 0 0
    1 1 0 1 0 0
    0 1 0 1 0 0
    1 0 1 0 0 0
    1 1 0 0 0 1
    0 1 0 0 0 1
    1 1 0 1 0 0
    1 1 0 1 0 0
    0 1 0 0 0 1
    1 1 0 1 0 0
    1 1 1 0 0 0
    1 1 0 0 0 1
    1 1 1 0 0 0
    1 1 0 0 0 1
    1 1 0 1 0 0
    1 0 1 0 0 0
    end
    label values firstgen firstgencategory
    label def firstgencategory 0 "Non-first-gen", modify
    label def firstgencategory 1 "First-gen", modify
    label values everenrollcollege everattendcategory
    label def everattendcategory 0 "0.No", modify
    label def everattendcategory 1 "1.Yes", modify

  • #2
    an example using -suest- is given in this FAQ: https://www.stata.com/support/faqs/s...ata/index.html

    Comment

    Working...
    X