Announcement

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

  • Using -mi predict- to calculate "reffects and "reses"

    Dear All,

    I am currently working with a survey dataset to conduct a multilevel logistic regression analysis. The command I am using is -meqrlogit- in Stata 14.1. Due to the problem of nonresponse, the data is treated with multiple imputation procedures (MICE, m=10). As a result, the number of post-estimation options I have, when using -mi estimate-, is somewhat reduced. In particular, I am struggling to find a way to rank and visualise my results in a standard error bar graph (serrbar) given I cannot seem to calculate the linear unbiased predictions or standard errors of random effects in my null model.

    The conventional way, without using multiple imputation, appears to use the -predict- command with -reffects- or -reses- options included. For instance:

    Code:
    meqrlogit mviolence || country: ,mle var
    predict u0, reffects
    predict u0se, reses
    sort u0
    gen country=sum(pickone)
    gsort -pickone -country
    list cntry u0 u0se country if pickone==1
    capture drop u0 u0se country pickone
    serrbar u0 u0se country if pickone==1, scale(1.96) yline(0) mvopts(mlabel(cntry))
    //Produce a Caterpillar Plot//
    //label define cat1//
    tab cntry
    label define country1 1 "Ukraine" 2 "Bulgaria" 3 "Georgia" 4 "Russia" 5 "Lithuania" 6 "Czech Republic" ///
    7 "Hungary" 8 "Slovakia" 9 "Portugal" 10 "Croatia" 11 "Ireland" 12 "Estonia" 13 "France" 14 "Cyprus" ///
    15 "Poland" 16 "Germany" 17 "Great Britain" 18 "Slovenia" 19 "Israel" 20 "Spain" 21 "Belgium" ///
    22 "Netherlands" 23 "Switzerland" 24 "Sweden" 25 "Norway" 26 "Denmark" 27 "Finland" 
    label values country country1
    serrbar u0 u0se country if pickone==1, scale(1.96) yline(0) ytitle("Predicted Random Intercept") ///
    xtitle("Country") xlabel(1 (1) 27, valuelabel labsize(2) angle(vertical) g)
    When using -mi predict- or -mi predictnl- however, this command does not work and I cannot seem to compute either -reffects- or -reses-. The typical message is that such options cannot be calcuated. Now, this may simply be a syntatic error on my part, or some statistical convention far beyond my comprehension.

    However, I wondered whether or not there was another way of calculating the equivalent -reffects- or -reses- in Stata?

    Apologies for any inconvenience (and the somewhat long-winded and convoluted explanation)

    Kind Regards,

    Patrick

  • #2
    Hi Patrick and everyone.
    I have the same issue.
    Did you figure out how to generate reffects and reses with a mi mixed model?

    I wonder if the pv program can be used to do this?
    I'm using pv with a mixed model but with 5 plausible values for a single variable to generate reffects and reses.
    Conceptually plausible values are the same as multiple imputed values.
    With pv this involved several steps to generate the sampling and imputation variance.
    So using may work with mi data...

    When I have time I will test pv with generating xb and sdtp, and see how it differs to that provided by mi the estimate.
    Looking at the mi formula for both parameter and variance estimation, I think it should work. The formula for generating both the parameter and variance in pv appear the same as mi.
    I will check.

    Has anyone else dealt with this issue?

    Regards,

    Andrew

    Comment


    • #3
      Just a thought. Could you predict the reffects and reses after running your mixed model for each of the imputed datasets? Then you could think about looking at them as a range of plausible values for the random effects. Not ideal.

      Comment

      Working...
      X