Dear fellow S+ users,
I'm using S+ 4.5 on my Pc. In the last days I'm trying to work with the
function lme (Linear Mixed Effects).
I'm trying to model longitudinal data. The covariate in the model is only
the time and indicator variable for sex group.
I have two questions about the lme function the fist related to the fixed
and random effect specification and the second to missing values.
**** FIRST QUESTION *****
How can I estimate a model without random effects?
The first model that i estimated is a random intercept model, i used the
following code to estimate it.
lme(fixed=resp~sex+time*sex,
random=~1,
cluster=~idnr,
est.method=c("ML"),
data=Gro2)
Next I want to compare the first model with a model that not contain the
random intercept (fixed effect model with unstructured covariance matrix).
When I used the following code
hhh <- lme(fixed=resp~sex+time*sex,
cluster=~idnr,
est.method=c("ML"),
data=Gro2)
The results
> summary(hhh)
Call:
Fixed: resp ~ sex + time * sex
Random: ~ sex + time * sex
Cluster: ~ idnr
Data: Gro2
This mean the model contains now three random effect - Random: ~ sex +
time * sex. When I used the code
hhh <- lme(fixed=resp~sex+time*sex,
random=~-1,
cluster=~idnr,
est.method=c("ML"),
data=Gro2)
I got the random model intercept once again.
IS IT POSSIBLE THAT THE FUNCTION lme CANNOT ESTIMATES A FIXED EFFECTS MODEL ?
**** SECOND QUESTION *****
The default of na.action is to create an error if missing values are
present, and if I use na.action=na.omit all the observation with missing
values will be deleted. This means that if I'm using lme to model data with
repeated measurements (and if i have missing values) the analysis will be
complete case analysis.
IS IT POSSIBLE THAT THE FUNCTION CANNOT HANDEL MISSING VALUES ?
Thanks for your time and help, Ziv.
=========================================================
Ziv Shkedy
Biostatistics
Center for Statistics
Limburgs Universitair Centrum
Universitaire Campus, department WNI
B-3590 Diepenbeek, Belgium
Tel: +32-(0)11-26.82.57
e-mail: ziv.shkedy@luc.ac.be
=========================================================
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news
|