Hi there,

 

I am trying to run simulations using R with linear mixed model (lme). There
are two factors in my fixed effect model, educ (treatment and control) and
mth (visit 1, 2, and 3). What I want to obtain is the estimated treatment
difference (treatment - control) at visit 3, plus the standard error and
p-value. This can be easily obtained in SAS using lsmeans or estimate
statements, but I am not sure how to do this in R. 

 

The fixed effects I obtained are as follows:

 

Fixed effects: ymth ~ educ * mth - 1 

                                    Value               Std.Error
DF        t-value               p-value

educcont                       0.14814308       0.006232419      93
23.769758         0.0000

eductreat                       0.13696952       0.006255672      93
21.895254         0.0000

mthymth2                      0.00003759       0.006333043      165
0.005936           0.9953

mthymth3                      0.01075489       0.006251328      165
1.720416           0.0872

eductreat:mthymth2       0.00323847       0.008947291      165
0.361950           0.7179

eductreat:mthymth3       -0.01246565      0.008941306      165
-1.394164          0.1651

 

 

The estimated treatment difference I am interested are:

 

 a<-0.14814308+0.01075489 

 b<-0.13696952+0.01075489-0.01246565

> b-a

[1] -0.02363921   (treatment effect at visit 3, same as SAS lsmean output)

 

But I don't know how to get the standard error and corresponding p-value for
this estimate. Any of your helps on that would be greatly appreciated!

 

 

Thanks,

Yannan

 


	[[alternative HTML version deleted]]

