Announcement

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

  • Estimate treatment effects in randomized controlled trials

    Dear stata users,
    I am using mixed effext model to estimate treatment effects in a RCT. I am building the model without the treatment variable following Twisk 2018, equation 2d. The data is in long format. I have 3 measureponits;t0 (baseline) ,t1 and t2. Gid=class and pid=person id, INT= interventiongroup(value 1)controlgroup (value 0).

    I have tried out different ways to estimate Twisk model, but I am confused because it seems like I have to prefix the variable with c. to get the model that I want. I will appreciate if someone could tell my why is this? And which command do I use to get the correct model?


    Equation 2d from Twisk:
    Yt=B0+B1 dummytime1+ B2 dummytime2+ B3 dummytime1*X+ B4 dummytime2*X



    I have used the following command in Stata:

    Model 1:
    mixed dependent ib0.time i.INT#ib0.time ||gid:||pid:
    (dependent variable) Coef.
    time
    1 .2402717
    2 .3587286
    INT#time
    interventiongroup#0 -.547065
    interventiongroup#1 .1305625
    interventiongroup#2 -.0608405
    _cons 28.98464

    However, I don’t get the output that Twisk recommend when using this command (see model 1). According to Twisk it should only be 4 parameters: time1,time2, time1#int and time2#int.

    When I use the command above I get the model (model 2) that are similar to that one Twisk recommend, note that I prefix the variables with c. and I use dummytime variables. If I prefix with i. see model 3, I get another results.

    Model 2:
    mixed dependent c.t1 c.t2 c.t1#i.INT c.t2#i.INT ||gid:||pid:
    dependent Coef.
    t1 .2669381
    t2 .3859549
    INT#c.t1
    interventiongroup .623224
    INT#c.t2
    interventiongroup .4309041
    _cons 28.71222

    Model 3
    . mixed dependent i.t1 i.t2 i.t1#i.INT i.t2#i.INT ||gid:||pid:
    dependent Coef.
    1.t1 .2402717
    1.t2 .3587286
    t1#INT
    0# interventiongroup -.0608405
    1# interventiongroup .616787
    t2#INT
    0# interventiongroup -.4862245
    1# interventiongroup 0 (omitted)
    _cons 28.98464
    I apologize for asking such a long question.
    Many thanks


  • #2
    Well, I read Twisk a long, long time ago, and I no longer have a copy available, so I can't really comment on your question as posed.

    What I will say is that this actually has nothing to do with c. vs i. What is going on here is that you have adopted a somewhat unnatural parameterization of your model in Model 1. You have specified the time#INT interaction, but have omitted the INT main effect. It is for this reason that you are getting the "extra" interaction term. It's "making up" for the omission of the INT main effect. But it makes no difference anyway. You will be hard pressed to understand and interpret the outcome anyway. To see what Model 1 (or any of the models) is telling you, run -margins time#INT- and you will get the model's predictions for the expected outcome in each group at each time period (all 6 combinations of 2 groups and 3 time points). And you will see that they are the same for all of these models. They are also all the same as what you would get if you ran the simpler, more compact command

    Code:
    mixed dependent ib0.time##i.INT || gid: || pid:
    which uses the more standard parameterization with full specification of the main effects plus the interaction term(s).

    By the way, while I don't foresee you getting any incorrect results from using the c. prefix in this particular model, it's a bad habit to get into. With a non-linear model, -margins- will give you different marginal effects depending on whether a variable is designated as discrete or continuous in the regression. So in that situation, it's important to get it right.
    Last edited by Clyde Schechter; 02 Oct 2020, 14:49.

    Comment


    • #3
      Is the Twisk (2018) that you're refering to this?

      You can get what Twisk and colleagues describe for their Equation 2d by fitting the model shown below. Start at the "Begin here" comment; Twisk et alii are coy with their illustrative dataset, and so I've created a fictitious one for illustration here, which is shown at the top of the output below.

      The first model fitted is the conventional repeated-measures ANOVA, using both anova and then mixed. Last is the constrained-baseline model given by their Equation 2d. You'll see the four parameter estimates (plus pooled baseline) that you're expecting. Treatment effects are estimated separately for each posttreatment interval, and are shown (along with their standard errors and confidence bounds) in the regression table output in the section for interaction terms.

      .ÿ
      .ÿversionÿ16.1

      .ÿ
      .ÿclearÿ*

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

      .ÿ
      .ÿ//ÿPatients
      .ÿquietlyÿsetÿobsÿ24

      .ÿgenerateÿpidÿ=ÿ_n

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

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

      .ÿlabelÿdefineÿGroupsÿ0ÿControlÿ1ÿExperimental

      .ÿlabelÿvaluesÿtrtÿGroups

      .ÿ
      .ÿ//ÿObservationÿtimes
      .ÿquietlyÿexpandÿ3

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

      .ÿlabelÿdefineÿTimesÿ0ÿBaselineÿ1ÿFirstÿ2ÿSecond

      .ÿlabelÿvaluesÿtimÿTimes

      .ÿ
      .ÿgenerateÿdoubleÿoutÿ=ÿpid_uÿ+ÿ0ÿ*ÿtrtÿ+ÿ0ÿ*ÿtrtÿ*ÿtimÿ+ÿrnormal()

      .ÿ
      .ÿ*
      .ÿ*ÿBeginÿhere
      .ÿ*
      .ÿ//ÿPretreatmentÿ(baseliine)ÿvalues
      .ÿtableÿtrtÿifÿ!tim,ÿcontents(meanÿoutÿsdÿoutÿnÿout)ÿformat(%3.1f)

      -------------------------------------------------
      ÿÿÿÿÿÿÿÿÿtrtÿ|ÿÿmean(out)ÿÿÿÿÿsd(out)ÿÿÿÿÿÿN(out)
      -------------+-----------------------------------
      ÿÿÿÿÿControlÿ|ÿÿÿÿÿÿÿ-0.4ÿÿÿÿÿÿÿÿÿ1.3ÿÿÿÿÿÿÿÿÿÿ12
      Experimentalÿ|ÿÿÿÿÿÿÿÿ0.3ÿÿÿÿÿÿÿÿÿ1.4ÿÿÿÿÿÿÿÿÿÿ12
      -------------------------------------------------

      .ÿ
      .ÿ//ÿConventionalÿrepeated-measuresÿANOVA
      .ÿanovaÿoutÿtrtÿ/ÿpid|trtÿtimÿtrt#tim,ÿrepeated(tim)

      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿNumberÿofÿobsÿ=ÿÿÿÿÿÿÿÿÿ72ÿÿÿÿR-squaredÿÿÿÿÿ=ÿÿ0.6165
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿRootÿMSEÿÿÿÿÿÿ=ÿÿÿÿ1.01847ÿÿÿÿAdjÿR-squaredÿ=ÿÿ0.3811

      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿSourceÿ|ÿPartialÿSSÿÿÿÿÿÿÿÿÿdfÿÿÿÿÿÿÿÿÿMSÿÿÿÿÿÿÿÿFÿÿÿÿProb>F
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿ-----------+----------------------------------------------------
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿModelÿ|ÿÿ73.356756ÿÿÿÿÿÿÿÿÿ27ÿÿÿ2.7169169ÿÿÿÿÿÿ2.62ÿÿ0.0022
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ|
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿtrtÿ|ÿÿ2.8365744ÿÿÿÿÿÿÿÿÿÿ1ÿÿÿ2.8365744ÿÿÿÿÿÿ0.98ÿÿ0.3319
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿpid|trtÿ|ÿÿ63.380049ÿÿÿÿÿÿÿÿÿ22ÿÿÿ2.8809113ÿÿ
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿ-----------+----------------------------------------------------
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿtimÿ|ÿÿ6.0475089ÿÿÿÿÿÿÿÿÿÿ2ÿÿÿ3.0237544ÿÿÿÿÿÿ2.92ÿÿ0.0647
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿtrt#timÿ|ÿÿ1.0926229ÿÿÿÿÿÿÿÿÿÿ2ÿÿÿ.54631146ÿÿÿÿÿÿ0.53ÿÿ0.5942
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ|
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿResidualÿ|ÿÿ45.640474ÿÿÿÿÿÿÿÿÿ44ÿÿÿ1.0372835ÿÿ
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿ-----------+----------------------------------------------------
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿTotalÿ|ÿÿ118.99723ÿÿÿÿÿÿÿÿÿ71ÿÿÿ1.6760173ÿÿ


      Between-subjectsÿerrorÿterm:ÿÿpid|trt
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿLevels:ÿÿ24ÿÿÿÿÿÿÿÿ(22ÿdf)
      ÿÿÿÿÿLowestÿb.s.e.ÿvariable:ÿÿpid
      ÿÿÿÿÿCovarianceÿpooledÿover:ÿÿtrtÿÿÿÿÿÿÿ(forÿrepeatedÿvariable)

      Repeatedÿvariable:ÿtim
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿHuynh-Feldtÿepsilonÿÿÿÿÿÿÿÿ=ÿÿ1.0834
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ*Huynh-Feldtÿepsilonÿresetÿtoÿ1.0000
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿGreenhouse-Geisserÿepsilonÿ=ÿÿ0.9491
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿBox'sÿconservativeÿepsilonÿ=ÿÿ0.5000

      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ------------ÿProbÿ>ÿFÿ------------
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿSourceÿ|ÿÿÿÿÿdfÿÿÿÿÿÿFÿÿÿÿRegularÿÿÿÿH-FÿÿÿÿÿÿG-GÿÿÿÿÿÿBox
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿ-----------+----------------------------------------------------
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿtimÿ|ÿÿÿÿÿÿ2ÿÿÿÿÿ2.92ÿÿÿ0.0647ÿÿÿ0.0647ÿÿÿ0.0679ÿÿÿ0.1018
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿtrt#timÿ|ÿÿÿÿÿÿ2ÿÿÿÿÿ0.53ÿÿÿ0.5942ÿÿÿ0.5942ÿÿÿ0.5851ÿÿÿ0.4757
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿResidualÿ|ÿÿÿÿÿ44
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿ----------------------------------------------------------------

      .ÿ
      .ÿmixedÿoutÿi.trt##i.timÿ||ÿpid:ÿ,ÿremlÿdfmethod(satterthwaite)ÿ///
      >ÿÿÿÿÿnoconstantÿresiduals(exchangeable)ÿnolrtestÿnolog

      Mixed-effectsÿREMLÿregressionÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿNumberÿofÿobsÿÿÿÿÿ=ÿÿÿÿÿÿÿÿÿ72
      Groupÿvariable:ÿpidÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿNumberÿofÿgroupsÿÿ=ÿÿÿÿÿÿÿÿÿ24

      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿObsÿperÿgroup:
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿminÿ=ÿÿÿÿÿÿÿÿÿÿ3
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿavgÿ=ÿÿÿÿÿÿÿÿ3.0
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿmaxÿ=ÿÿÿÿÿÿÿÿÿÿ3
      DFÿmethod:ÿSatterthwaiteÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿDF:ÿÿÿÿÿÿÿÿÿÿÿminÿ=ÿÿÿÿÿÿ44.00
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿavgÿ=ÿÿÿÿÿÿ46.56
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿmaxÿ=ÿÿÿÿÿÿ51.69

      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿF(5,ÿÿÿÿ46.60)ÿÿÿÿ=ÿÿÿÿÿÿÿ1.57
      Logÿrestricted-likelihoodÿ=ÿ-113.54915ÿÿÿÿÿÿÿÿÿÿProbÿ>ÿFÿÿÿÿÿÿÿÿÿÿ=ÿÿÿÿÿ0.1861

      --------------------------------------------------------------------------------------
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿoutÿ|ÿÿÿÿÿÿCoef.ÿÿÿStd.ÿErr.ÿÿÿÿÿÿtÿÿÿÿP>|t|ÿÿÿÿÿ[95%ÿConf.ÿInterval]
      ---------------------+----------------------------------------------------------------
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿtrtÿ|
      ÿÿÿÿÿÿÿExperimentalÿÿ|ÿÿÿ.6501014ÿÿÿ.5246945ÿÿÿÿÿ1.24ÿÿÿ0.221ÿÿÿÿ-.4029252ÿÿÿÿ1.703128
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ|
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿtimÿ|
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿFirstÿÿ|ÿÿÿÿ.781263ÿÿÿ.4157891ÿÿÿÿÿ1.88ÿÿÿ0.067ÿÿÿÿ-.0567049ÿÿÿÿ1.619231
      ÿÿÿÿÿÿÿÿÿÿÿÿÿSecondÿÿ|ÿÿÿ-.116675ÿÿÿ.4157891ÿÿÿÿ-0.28ÿÿÿ0.780ÿÿÿÿ-.9546429ÿÿÿÿ.7212929
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ|
      ÿÿÿÿÿÿÿÿÿÿÿÿÿtrt#timÿ|
      ÿExperimental#Firstÿÿ|ÿÿ-.5870484ÿÿÿ.5880146ÿÿÿÿ-1.00ÿÿÿ0.324ÿÿÿÿ-1.772114ÿÿÿÿ.5980171
      Experimental#Secondÿÿ|ÿÿÿ-.172337ÿÿÿ.5880146ÿÿÿÿ-0.29ÿÿÿ0.771ÿÿÿÿ-1.357403ÿÿÿÿ1.012729
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ|
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ_consÿ|ÿÿ-.3586971ÿÿÿ.3710151ÿÿÿÿ-0.97ÿÿÿ0.338ÿÿÿÿ-1.103299ÿÿÿÿ.3859051
      --------------------------------------------------------------------------------------

      ------------------------------------------------------------------------------
      ÿÿRandom-effectsÿParametersÿÿ|ÿÿÿEstimateÿÿÿStd.ÿErr.ÿÿÿÿÿ[95%ÿConf.ÿInterval]
      -----------------------------+------------------------------------------------
      pid:ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ(empty)ÿ|
      -----------------------------+------------------------------------------------
      Residual:ÿExchangeableÿÿÿÿÿÿÿ|
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿvar(e)ÿ|ÿÿÿ1.651826ÿÿÿ.3249175ÿÿÿÿÿÿ1.123392ÿÿÿÿ2.428831
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿcov(e)ÿ|ÿÿÿ.6145427ÿÿÿ.2987791ÿÿÿÿÿÿ.0289463ÿÿÿÿ1.200139
      ------------------------------------------------------------------------------

      .ÿcontrastÿtrtÿtimÿtrt#tim,ÿsmallÿ//ÿcf.ÿANOVAÿtableÿabove

      Contrastsÿofÿmarginalÿlinearÿpredictions

      Marginsÿÿÿÿÿÿ:ÿasbalanced

      -----------------------------------------------------------
      ÿÿÿÿÿÿÿÿÿÿÿÿÿ|ÿÿÿÿÿÿÿÿÿdfÿÿÿÿÿÿÿÿddfÿÿÿÿÿÿÿÿÿÿÿFÿÿÿÿÿÿÿÿP>F
      -------------+---------------------------------------------
      outÿÿÿÿÿÿÿÿÿÿ|
      ÿÿÿÿÿÿÿÿÿtrtÿ|ÿÿÿÿÿÿÿÿÿÿ1ÿÿÿÿÿÿ22.00ÿÿÿÿÿÿÿÿ0.98ÿÿÿÿÿ0.3319
      ÿÿÿÿÿÿÿÿÿÿÿÿÿ|
      ÿÿÿÿÿÿÿÿÿtimÿ|ÿÿÿÿÿÿÿÿÿÿ2ÿÿÿÿÿÿ44.00ÿÿÿÿÿÿÿÿ2.92ÿÿÿÿÿ0.0647
      ÿÿÿÿÿÿÿÿÿÿÿÿÿ|
      ÿÿÿÿÿtrt#timÿ|ÿÿÿÿÿÿÿÿÿÿ2ÿÿÿÿÿÿ44.00ÿÿÿÿÿÿÿÿ0.53ÿÿÿÿÿ0.5942
      -----------------------------------------------------------

      .ÿ
      .ÿ//ÿTwiskÿetÿal.,ÿEquationÿ2d
      .ÿmixedÿoutÿi.timÿ1.trt#i(1/2).timÿ||ÿpid:ÿ,ÿ///
      >ÿÿÿÿÿremlÿdfmethod(satterthwaite)ÿnoconstantÿresiduals(exchangeable)ÿ///
      >ÿÿÿÿÿnolrtestÿnolog

      Mixed-effectsÿREMLÿregressionÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿNumberÿofÿobsÿÿÿÿÿ=ÿÿÿÿÿÿÿÿÿ72
      Groupÿvariable:ÿpidÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿNumberÿofÿgroupsÿÿ=ÿÿÿÿÿÿÿÿÿ24

      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿObsÿperÿgroup:
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿminÿ=ÿÿÿÿÿÿÿÿÿÿ3
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿavgÿ=ÿÿÿÿÿÿÿÿ3.0
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿmaxÿ=ÿÿÿÿÿÿÿÿÿÿ3
      DFÿmethod:ÿSatterthwaiteÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿDF:ÿÿÿÿÿÿÿÿÿÿÿminÿ=ÿÿÿÿÿÿ52.49
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿavgÿ=ÿÿÿÿÿÿ58.32
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿmaxÿ=ÿÿÿÿÿÿ65.46

      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿF(4,ÿÿÿÿ49.34)ÿÿÿÿ=ÿÿÿÿÿÿÿ1.58
      Logÿrestricted-likelihoodÿ=ÿ-114.58937ÿÿÿÿÿÿÿÿÿÿProbÿ>ÿFÿÿÿÿÿÿÿÿÿÿ=ÿÿÿÿÿ0.1956

      --------------------------------------------------------------------------------------
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿoutÿ|ÿÿÿÿÿÿCoef.ÿÿÿStd.ÿErr.ÿÿÿÿÿÿtÿÿÿÿP>|t|ÿÿÿÿÿ[95%ÿConf.ÿInterval]
      ---------------------+----------------------------------------------------------------
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿtimÿ|
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿFirstÿÿ|ÿÿÿ.5782048ÿÿÿ.3828866ÿÿÿÿÿ1.51ÿÿÿ0.137ÿÿÿÿ-.1894077ÿÿÿÿ1.345817
      ÿÿÿÿÿÿÿÿÿÿÿÿÿSecondÿÿ|ÿÿ-.3197333ÿÿÿ.3828866ÿÿÿÿ-0.84ÿÿÿ0.407ÿÿÿÿ-1.087346ÿÿÿÿ.4478792
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ|
      ÿÿÿÿÿÿÿÿÿÿÿÿÿtrt#timÿ|
      ÿExperimental#Firstÿÿ|ÿÿ-.1809319ÿÿÿ.4888132ÿÿÿÿ-0.37ÿÿÿ0.712ÿÿÿÿÿ-1.15703ÿÿÿÿ.7951666
      Experimental#Secondÿÿ|ÿÿÿ.2337795ÿÿÿ.4888132ÿÿÿÿÿ0.48ÿÿÿ0.634ÿÿÿÿ-.7423191ÿÿÿÿ1.209878
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ|
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ_consÿ|ÿÿ-.0336465ÿÿÿ.2636811ÿÿÿÿ-0.13ÿÿÿ0.899ÿÿÿÿ-.5626428ÿÿÿÿ.4953499
      --------------------------------------------------------------------------------------

      ------------------------------------------------------------------------------
      ÿÿRandom-effectsÿParametersÿÿ|ÿÿÿEstimateÿÿÿStd.ÿErr.ÿÿÿÿÿ[95%ÿConf.ÿInterval]
      -----------------------------+------------------------------------------------
      pid:ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ(empty)ÿ|
      -----------------------------+------------------------------------------------
      Residual:ÿExchangeableÿÿÿÿÿÿÿ|
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿvar(e)ÿ|ÿÿÿ1.668666ÿÿÿ.3263236ÿÿÿÿÿÿ1.137388ÿÿÿÿ2.448104
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿcov(e)ÿ|ÿÿÿ.6262549ÿÿÿ.3034204ÿÿÿÿÿÿ.0315618ÿÿÿÿ1.220948
      ------------------------------------------------------------------------------

      .ÿ
      .ÿexit

      endÿofÿdo-file


      .


      Years ago, I ran across a presentation by a statistician at the U.S. Food and Drug Administration (U.S. FDA) that described this approach (using SAS PROC MIXED, of course). He kindly furnished me his slidedeck when I e-mailed him, which I've since lost, and alas have also forgotten his name. If you run across his abstract (I can't find it on the agency's website), you might want to post the link to it in this thread for completeness. (The slidedeck, I'm sure, had the usual disclaimer about agency endorsement of the method.)

      Comment


      • #4
        Many thanks for your reply, I will try this out and I will post the link to this thread if I run across .the abstract you mention.

        Comment


        • #5
          One thing that you will probably want to change from what I showed above is to use the Kenward-Rogers approximation instead of the Satterthwaite. That is
          Code:
          mixed out i.tim 1.trt#i(1/2).tim || pid: , ///
              noconstant residuals(exchangeable) ///
                  reml dfmethod(kroger) ///
                      nolrtest nolog
          Although the Satterthwaite small-sample approximation is fine for the first model, this Twisk thing is a little kinky what with the constrained-to-be-equal treatment mean at the pretreatment time point / absence of the main effects factor for treatment in the model.

          I checked the two, and in the example I used the results were nearly the same, but the standard errors (and confidence bounds) weren't identical for the two coefficients of principal interest. I think that the advice in the literature (for example, see the help file for mixed) is to trust the Kenward-Rogers method more in anything but bog-standard models.

          Comment


          • #6
            Kenward-Rogers → Kenward-Roger

            Comment


            • #7
              Many thanks, by using the suggested command above I got the Twisk model.

              Comment

              Working...
              X