Dear Nick and other users
I forgot to Forward Ripley's response so there it is:
best wishes, Ziv.
>>>
>>> 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 ?
>>
>>
>>Yes, but with a single cluster there is no difference between these models:
>>the MLEs are the same for each model. You could just use lm,
>>of course, unless you intend to use correlations later.
>>
>>The function gls() in the beta nlm3 (see nlme.stat.wisc.edu/Beta)
>>may be what you are looking for.
>>
>>
>>
>>
>>>
>>> **** 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 ?
>>
>>That is true, and the final comment is true for almost all of linear
>>modelling.
>>
>>
>>--
>>Brian D. Ripley, ripley@stats.ox.ac.uk
>>Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
>>University of Oxford, Tel: +44 1865 272861 (self)
>>1 South Parks Road, +44 1865 272860 (secr)
>>Oxford OX1 3TG, UK Fax: +44 1865 272595
>>
>>
>>
>
=========================================================
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
|