Announcement

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

  • Predicting values which incorporate fixed and random effects in linear mixed model

    Hi all,

    I am using Stata/SE 14.2 to analyse a randomized controlled trial. Respondents filled the Beck Depression Inventory (bdi) at times 0, 1 and 2. To control for baselines values of the outcome (i.e. control for regression to the mean), I am building the model without the treatment variable and using id: as the second level (following Twisk 2018). The data is in long format

    Code:
    mixed bdi i.time i.intervention#i.time || id:, var
    The interaction intervention*time gives me the mean difference in bdi at time 1 and 2. But now I would like to obtain the predicted means of bdi at times 0, 1 and 2 to make a graph for the publication. For this, I am using predict with the option fitted to obtain means that incorporate both fixed and random effects.

    Code:
    predict predri, fitted 
    mean predri if time==0 & intervention==1
    mean predri if time==0 & intervention==0
    mean predri if time==1 & intervention==1
    mean predri if time==1 & intervention==0
    mean predri if time==2 & intervention==1
    mean predri if time==2 & intervention==0
    However, I obtain exactly the same means as the unadjusted ones using tabstat. In the data, original and predicted values are different, but when I extract the means, these are the same.

    Using margins has the same problem (as only fixed effects are incorporated)

    Code:
    margins i.time#i.intervention
    I am wondering what is wrong and how I could calculate predictive means that incorporate both fixed and random effects in order to produce a graph.

    Thanks in advance for your time

    Reference:
    Twisk J, Bosman L, Hoekstra T, Rijnhart J, Welten M, Heymans M. Different ways to estimate treatment effects in randomised controlled trials. Contemporary clinical trials communications 2018; 10: 80-5.




    ---
    Sebastián Peña, MD, MSc
    Visiting Scholar
    Department of Public Health Solutions
    National Institute for Health and Welfare
    Last edited by Sebastian Pena; 30 Mar 2019, 16:58.

  • #2
    Originally posted by Sebastian Pena View Post
    I am wondering what is wrong and how I could calculate predictive means that incorporate both fixed and random effects in order to produce a graph.
    Nothing is wrong, and you'd produce a graph by using marginsplot following your margins that you showed.

    The expectation of the random effect is zero, and so when you average the predictions, it doesn't show up in the means. It will show up in the variance, however. See below toward the bottom.

    By the way, you might want to compare your model and the fully interacted conventional model. That is, compare your
    Code:
    mixed bdi i.time i.intervention#i.time || id:
    with the corresponding
    Code:
    mixed bdi i.intervention##i.time || id
    as I have done below with fake data.

    .ÿ
    .ÿversionÿ15.1

    .ÿ
    .ÿclearÿ*

    .ÿ
    .ÿsetÿseedÿ`=strreverse("1490964")'

    .ÿquietlyÿsetÿobsÿ250

    .ÿgenerateÿbyteÿtrtÿ=ÿmod(_n,ÿ2)

    .ÿgenerateÿintÿpidÿ=ÿ_n

    .ÿgenerateÿdoubleÿpid_uÿ=ÿrnormal()

    .ÿ
    .ÿquietlyÿexpandÿ3

    .ÿbysortÿpid:ÿgenerateÿbyteÿtimÿ=ÿ_nÿ-ÿ1

    .ÿgenerateÿdoubleÿxbÿ=ÿpid_uÿ+ÿrnormal()

    .ÿsummarizeÿxb,ÿmeanonly

    .ÿgenerateÿbyteÿbdiÿ=ÿfloor(ÿ63ÿ*ÿ(xbÿ-ÿr(min))ÿ/ÿ(r(max)ÿ-ÿr(min))ÿ)

    .ÿ
    .ÿ*
    .ÿ*ÿBeginÿhere
    .ÿ*
    .ÿmixedÿbdiÿi.trt##i.timÿ||ÿpid:ÿ,ÿnolrtestÿnolog

    Mixed-effectsÿMLÿregressionÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿNumberÿofÿobsÿÿÿÿÿ=ÿÿÿÿÿÿÿÿ750
    Groupÿvariable:ÿpidÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿNumberÿofÿgroupsÿÿ=ÿÿÿÿÿÿÿÿ250

    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿObsÿperÿgroup:
    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿminÿ=ÿÿÿÿÿÿÿÿÿÿ3
    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿavgÿ=ÿÿÿÿÿÿÿÿ3.0
    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿmaxÿ=ÿÿÿÿÿÿÿÿÿÿ3

    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿWaldÿchi2(5)ÿÿÿÿÿÿ=ÿÿÿÿÿÿÿ8.44
    Logÿlikelihoodÿ=ÿ-2729.1914ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿProbÿ>ÿchi2ÿÿÿÿÿÿÿ=ÿÿÿÿÿ0.1338

    ------------------------------------------------------------------------------
    ÿÿÿÿÿÿÿÿÿbdiÿ|ÿÿÿÿÿÿCoef.ÿÿÿStd.ÿErr.ÿÿÿÿÿÿzÿÿÿÿP>|z|ÿÿÿÿÿ[95%ÿConf.ÿInterval]
    -------------+----------------------------------------------------------------
    ÿÿÿÿÿÿÿ1.trtÿ|ÿÿÿÿÿÿ1.424ÿÿÿ1.312423ÿÿÿÿÿ1.09ÿÿÿ0.278ÿÿÿÿ-1.148303ÿÿÿÿ3.996303
    ÿÿÿÿÿÿÿÿÿÿÿÿÿ|
    ÿÿÿÿÿÿÿÿÿtimÿ|
    ÿÿÿÿÿÿÿÿÿÿ1ÿÿ|ÿÿÿÿÿÿ-.016ÿÿÿ.9207477ÿÿÿÿ-0.02ÿÿÿ0.986ÿÿÿÿ-1.820632ÿÿÿÿ1.788632
    ÿÿÿÿÿÿÿÿÿÿ2ÿÿ|ÿÿÿÿÿÿ1.128ÿÿÿ.9207477ÿÿÿÿÿ1.23ÿÿÿ0.221ÿÿÿÿ-.6766323ÿÿÿÿ2.932632
    ÿÿÿÿÿÿÿÿÿÿÿÿÿ|
    ÿÿÿÿÿtrt#timÿ|
    ÿÿÿÿÿÿÿÿ1ÿ1ÿÿ|ÿÿÿÿÿ-1.696ÿÿÿ1.302134ÿÿÿÿ-1.30ÿÿÿ0.193ÿÿÿÿ-4.248135ÿÿÿÿ.8561354
    ÿÿÿÿÿÿÿÿ1ÿ2ÿÿ|ÿÿÿÿÿÿ-.696ÿÿÿ1.302134ÿÿÿÿ-0.53ÿÿÿ0.593ÿÿÿÿ-3.248135ÿÿÿÿ1.856135
    ÿÿÿÿÿÿÿÿÿÿÿÿÿ|
    ÿÿÿÿÿÿÿ_consÿ|ÿÿÿÿÿ30.136ÿÿÿ.9280235ÿÿÿÿ32.47ÿÿÿ0.000ÿÿÿÿÿ28.31711ÿÿÿÿ31.95489
    ------------------------------------------------------------------------------

    ------------------------------------------------------------------------------
    ÿÿRandom-effectsÿParametersÿÿ|ÿÿÿEstimateÿÿÿStd.ÿErr.ÿÿÿÿÿ[95%ÿConf.ÿInterval]
    -----------------------------+------------------------------------------------
    pid:ÿIdentityÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ|
    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿvar(_cons)ÿ|ÿÿÿ54.66744ÿÿÿ6.565074ÿÿÿÿÿÿ43.20231ÿÿÿÿ69.17521
    -----------------------------+------------------------------------------------
    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿvar(Residual)ÿ|ÿÿÿ52.98602ÿÿÿÿ3.35113ÿÿÿÿÿÿÿ46.8087ÿÿÿÿ59.97855
    ------------------------------------------------------------------------------

    .ÿtempnameÿll

    .ÿscalarÿdefineÿ`ll'ÿ=ÿe(ll)

    .ÿpredictÿdoubleÿxb1,ÿxb

    .ÿpredictÿdoubleÿxbu1,ÿfitted

    .ÿ
    .ÿmixedÿbdiÿi.timÿi.trt#i.timÿ||ÿpid:ÿ,ÿnolrtestÿnolog

    Mixed-effectsÿMLÿregressionÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿNumberÿofÿobsÿÿÿÿÿ=ÿÿÿÿÿÿÿÿ750
    Groupÿvariable:ÿpidÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿNumberÿofÿgroupsÿÿ=ÿÿÿÿÿÿÿÿ250

    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿObsÿperÿgroup:
    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿminÿ=ÿÿÿÿÿÿÿÿÿÿ3
    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿavgÿ=ÿÿÿÿÿÿÿÿ3.0
    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿmaxÿ=ÿÿÿÿÿÿÿÿÿÿ3

    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿWaldÿchi2(5)ÿÿÿÿÿÿ=ÿÿÿÿÿÿÿ8.44
    Logÿlikelihoodÿ=ÿ-2729.1914ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿProbÿ>ÿchi2ÿÿÿÿÿÿÿ=ÿÿÿÿÿ0.1338

    ------------------------------------------------------------------------------
    ÿÿÿÿÿÿÿÿÿbdiÿ|ÿÿÿÿÿÿCoef.ÿÿÿStd.ÿErr.ÿÿÿÿÿÿzÿÿÿÿP>|z|ÿÿÿÿÿ[95%ÿConf.ÿInterval]
    -------------+----------------------------------------------------------------
    ÿÿÿÿÿÿÿÿÿtimÿ|
    ÿÿÿÿÿÿÿÿÿÿ1ÿÿ|ÿÿÿÿÿÿ-.016ÿÿÿ.9207477ÿÿÿÿ-0.02ÿÿÿ0.986ÿÿÿÿ-1.820632ÿÿÿÿ1.788632
    ÿÿÿÿÿÿÿÿÿÿ2ÿÿ|ÿÿÿÿÿÿ1.128ÿÿÿ.9207477ÿÿÿÿÿ1.23ÿÿÿ0.221ÿÿÿÿ-.6766323ÿÿÿÿ2.932632
    ÿÿÿÿÿÿÿÿÿÿÿÿÿ|
    ÿÿÿÿÿtrt#timÿ|
    ÿÿÿÿÿÿÿÿ1ÿ0ÿÿ|ÿÿÿÿÿÿ1.424ÿÿÿ1.312423ÿÿÿÿÿ1.09ÿÿÿ0.278ÿÿÿÿ-1.148303ÿÿÿÿ3.996303
    ÿÿÿÿÿÿÿÿ1ÿ1ÿÿ|ÿÿÿÿÿÿ-.272ÿÿÿ1.312423ÿÿÿÿ-0.21ÿÿÿ0.836ÿÿÿÿ-2.844303ÿÿÿÿ2.300303
    ÿÿÿÿÿÿÿÿ1ÿ2ÿÿ|ÿÿÿÿÿÿÿ.728ÿÿÿ1.312423ÿÿÿÿÿ0.55ÿÿÿ0.579ÿÿÿÿ-1.844303ÿÿÿÿ3.300303
    ÿÿÿÿÿÿÿÿÿÿÿÿÿ|
    ÿÿÿÿÿÿÿ_consÿ|ÿÿÿÿÿ30.136ÿÿÿ.9280235ÿÿÿÿ32.47ÿÿÿ0.000ÿÿÿÿÿ28.31711ÿÿÿÿ31.95489
    ------------------------------------------------------------------------------

    ------------------------------------------------------------------------------
    ÿÿRandom-effectsÿParametersÿÿ|ÿÿÿEstimateÿÿÿStd.ÿErr.ÿÿÿÿÿ[95%ÿConf.ÿInterval]
    -----------------------------+------------------------------------------------
    pid:ÿIdentityÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ|
    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿvar(_cons)ÿ|ÿÿÿ54.66744ÿÿÿ6.565074ÿÿÿÿÿÿ43.20231ÿÿÿÿ69.17521
    -----------------------------+------------------------------------------------
    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿvar(Residual)ÿ|ÿÿÿ52.98602ÿÿÿÿ3.35113ÿÿÿÿÿÿÿ46.8087ÿÿÿÿ59.97855
    ------------------------------------------------------------------------------

    .ÿdisplayÿinÿsmclÿasÿtextÿ"Differenceÿinÿlog-likelihoodÿ=ÿ"ÿe(ll)ÿ-ÿ`ll'
    Differenceÿinÿlog-likelihoodÿ=ÿ0

    .ÿpredictÿdoubleÿxb2,ÿxb

    .ÿpredictÿdoubleÿxbu2,ÿfitted

    .ÿ
    .ÿforeachÿvarÿofÿvarlistÿ*1ÿ*2ÿ{
    ÿÿ2.ÿÿÿÿÿÿÿÿÿdisplayÿinÿsmclÿasÿtextÿ_newline(2)ÿ"`var'"
    ÿÿ3.ÿÿÿÿÿÿÿÿÿtableÿtrtÿtim,ÿcontents(meanÿ`var'ÿsdÿ`var')ÿformat(%4.1f)
    ÿÿ4.ÿ}


    xb1

    ----------------------------
    ÿÿÿÿÿÿÿÿÿÿ|ÿÿÿÿÿÿÿtimÿÿÿÿÿÿÿ
    ÿÿÿÿÿÿtrtÿ|ÿÿÿÿ0ÿÿÿÿÿ1ÿÿÿÿÿ2
    ----------+-----------------
    ÿÿÿÿÿÿÿÿ0ÿ|ÿ30.1ÿÿ30.1ÿÿ31.3
    ÿÿÿÿÿÿÿÿÿÿ|ÿÿ0.0ÿÿÿ0.0ÿÿÿ0.0
    ÿÿÿÿÿÿÿÿÿÿ|ÿ
    ÿÿÿÿÿÿÿÿ1ÿ|ÿ31.6ÿÿ29.8ÿÿ32.0
    ÿÿÿÿÿÿÿÿÿÿ|ÿÿ0.0ÿÿÿ0.0ÿÿÿ0.0
    ----------------------------


    xbu1

    ----------------------------
    ÿÿÿÿÿÿÿÿÿÿ|ÿÿÿÿÿÿÿtimÿÿÿÿÿÿÿ
    ÿÿÿÿÿÿtrtÿ|ÿÿÿÿ0ÿÿÿÿÿ1ÿÿÿÿÿ2
    ----------+-----------------
    ÿÿÿÿÿÿÿÿ0ÿ|ÿ30.1ÿÿ30.1ÿÿ31.3
    ÿÿÿÿÿÿÿÿÿÿ|ÿÿ6.0ÿÿÿ6.0ÿÿÿ6.0
    ÿÿÿÿÿÿÿÿÿÿ|ÿ
    ÿÿÿÿÿÿÿÿ1ÿ|ÿ31.6ÿÿ29.8ÿÿ32.0
    ÿÿÿÿÿÿÿÿÿÿ|ÿÿ6.9ÿÿÿ6.9ÿÿÿ6.9
    ----------------------------


    xb2

    ----------------------------
    ÿÿÿÿÿÿÿÿÿÿ|ÿÿÿÿÿÿÿtimÿÿÿÿÿÿÿ
    ÿÿÿÿÿÿtrtÿ|ÿÿÿÿ0ÿÿÿÿÿ1ÿÿÿÿÿ2
    ----------+-----------------
    ÿÿÿÿÿÿÿÿ0ÿ|ÿ30.1ÿÿ30.1ÿÿ31.3
    ÿÿÿÿÿÿÿÿÿÿ|ÿÿ0.0ÿÿÿ0.0ÿÿÿ0.0
    ÿÿÿÿÿÿÿÿÿÿ|ÿ
    ÿÿÿÿÿÿÿÿ1ÿ|ÿ31.6ÿÿ29.8ÿÿ32.0
    ÿÿÿÿÿÿÿÿÿÿ|ÿÿ0.0ÿÿÿ0.0ÿÿÿ0.0
    ----------------------------


    xbu2

    ----------------------------
    ÿÿÿÿÿÿÿÿÿÿ|ÿÿÿÿÿÿÿtimÿÿÿÿÿÿÿ
    ÿÿÿÿÿÿtrtÿ|ÿÿÿÿ0ÿÿÿÿÿ1ÿÿÿÿÿ2
    ----------+-----------------
    ÿÿÿÿÿÿÿÿ0ÿ|ÿ30.1ÿÿ30.1ÿÿ31.3
    ÿÿÿÿÿÿÿÿÿÿ|ÿÿ6.0ÿÿÿ6.0ÿÿÿ6.0
    ÿÿÿÿÿÿÿÿÿÿ|ÿ
    ÿÿÿÿÿÿÿÿ1ÿ|ÿ31.6ÿÿ29.8ÿÿ32.0
    ÿÿÿÿÿÿÿÿÿÿ|ÿÿ6.9ÿÿÿ6.9ÿÿÿ6.9
    ----------------------------

    .ÿ
    .ÿexit

    endÿofÿdo-file


    .

    Comment


    • #3
      Originally posted by Joseph Coveney View Post
      you might want to compare your model and the fully interacted conventional model.
      Forgot to mention the point: if you want something that "gives me the mean difference in bdi at time 1 and 2", then you'd just
      Code:
      mixed bdi i.trt##i.tim || pid: , nolrtest nolog
      margins tim, dydx(trt)
      that is, just fit the conventional fully interacted model and use margins (or contrasts) to get what you seek.

      Comment


      • #4
        Thanks Joseph for your thorough response.

        Is there a way to obtain the predicted values (or marginal means) which incorporate random effects? For example:

        Code:
        mixed bdi i.time i.intervention#i.time || id:, var
        predict predri, fitted  
        predict u, reffects
        gen predicted = predri + u
        Using margins tim, dydx(trt) gives me the same values in the coefficient of the interaction intervention#time. Does this mean that the coefficients also do not incorporate the random effects?

        Best wishes and many thanks,
        Sebastián

        Comment


        • #5
          Originally posted by Sebastian Pena View Post
          Is there a way to obtain the predicted values (or marginal means) which incorporate random effects?
          Yes. What I show above (predict double xbu, fitted) does this.

          mixed bdi i.time i.intervention#i.time || id:, var
          predict predri, fitted
          predict u, reffects
          gen predicted = predri + u
          I cannot understand why you are adding u twice. What are you trying to accomplish by this?

          Using margins tim, dydx(trt) gives me the same values in the coefficient of the interaction intervention#time.
          Yes. That was my point.

          Does this mean that the coefficients also do not incorporate the random effects?
          I don't understand where you are getting that notion from. When you fit a mixed model, you are accounting for the random effects. You can see below that the model gives true test size in the interaction term regardless of how large I make the random effect variance. I don't understand your contention that "the coefficients . . . do not incorporate the random effects".

          .ÿ
          .ÿversionÿ15.1

          .ÿ
          .ÿclearÿ*

          .ÿ
          .ÿsetÿseedÿ`=strreverse("1492176")'

          .ÿ
          .ÿprogramÿdefineÿsimem,ÿrclass
          ÿÿ1.ÿÿÿÿÿÿÿÿÿversionÿ15.1
          ÿÿ2.ÿÿÿÿÿÿÿÿÿsyntaxÿ,ÿ[Sigma2_u(realÿ1)]
          ÿÿ3.ÿ
          .ÿÿÿÿÿÿÿÿÿdropÿ_all
          ÿÿ4.ÿÿÿÿÿÿÿÿÿsetÿobsÿ250
          ÿÿ5.ÿÿÿÿÿÿÿÿÿgenerateÿbyteÿtrtÿ=ÿmod(_n,ÿ2)
          ÿÿ6.ÿÿÿÿÿÿÿÿÿgenerateÿintÿpidÿ=ÿ_n
          ÿÿ7.ÿÿÿÿÿÿÿÿÿgenerateÿdoubleÿpid_uÿ=ÿrnormal(0,ÿsqrt(`sigma2_u'))
          ÿÿ8.ÿ
          .ÿÿÿÿÿÿÿÿÿquietlyÿexpandÿ3
          ÿÿ9.ÿÿÿÿÿÿÿÿÿbysortÿpid:ÿgenerateÿbyteÿtimÿ=ÿ_nÿ-ÿ1
          ÿ10.ÿÿÿÿÿÿÿÿÿgenerateÿdoubleÿscoÿ=ÿpid_uÿ+ÿrnormal()
          ÿ11.ÿ
          .ÿÿÿÿÿÿÿÿÿmixedÿscoÿi.trt##i.timÿ||ÿpid:ÿ,ÿnolrtestÿnolog
          ÿ12.ÿÿÿÿÿÿÿÿÿtestÿ1.trt#1.tim,ÿnotest
          ÿ13.ÿÿÿÿÿÿÿÿÿtestÿ1.trt#2.tim,ÿaccumulate
          ÿ14.ÿÿÿÿÿÿÿÿÿreturnÿscalarÿpÿ=ÿr(p)
          ÿ15.ÿend

          .ÿ
          .ÿforeachÿsigma2_uÿinÿ1ÿ2ÿ4ÿ{
          ÿÿ2.ÿÿÿÿÿÿÿÿÿdisplayÿinÿsmclÿasÿtextÿ_newline(1)ÿ"Sigma2_uÿ=ÿ`sigma2_u'"
          ÿÿ3.ÿÿÿÿÿÿÿÿÿquietlyÿsimulateÿpÿ=ÿr(p),ÿreps(300):ÿsimemÿ,ÿs(`sigma2_u')
          ÿÿ4.ÿÿÿÿÿÿÿÿÿgenerateÿbyteÿposÿ=ÿpÿ<ÿ0.05
          ÿÿ5.ÿÿÿÿÿÿÿÿÿsummarizeÿpos,ÿmeanonly
          ÿÿ6.ÿÿÿÿÿÿÿÿÿdisplayÿinÿsmclÿasÿtextÿ"Testÿsizeÿ=ÿ"ÿ%04.2fÿr(mean)
          ÿÿ7.ÿ}

          Sigma2_uÿ=ÿ1
          Testÿsizeÿ=ÿ0.05

          Sigma2_uÿ=ÿ2
          Testÿsizeÿ=ÿ0.05

          Sigma2_uÿ=ÿ4
          Testÿsizeÿ=ÿ0.05

          .ÿ
          .ÿexit

          endÿofÿdo-file


          .

          Comment

          Working...
          X