> **** FIRST QUESTION *****
> How can I estimate a model without random effects?
The lme function was developed to fit linear mixed-effects models as
proposed by Laid and Ware (Biometrics, 1982). It does NOT allow you to
specify a model without random effects. From your description, I
assume you must be more familiar with PROC MIXED in SAS and were
expecting lme to behave in a similar way.
Version 3.0 of nlme, currently under beta testing and available from
http://nlme.stat.wisc.edu/Beta, includes a new modeling function, gls,
which fits linear models with correlated and/or heteroscedastic
errors, including errors with general, unstructured covariance. You
can think of gls as lme without the argument "random". I believe
that's what you are looking for. This version of nlme also includes a
gnls function to fit nonlinear models with correlated/heteroscedastic
errors, i.e. nlme without random effects.
> This mean the model contains now three random effect - Random: ~ sex +
> time * sex. When I used the code
By default, when the argument random is missing, all fixed effects
declared in the model formula will have associated random
effects. (BTW, the model you specified will have four, and not three,
random effects as the formula language in S differs from the one in
SAS: ~ sex + time*sex expands to ~ sex + time + sex:time, with the
intercept being included by default and the interaction between sex
and time being represented by sex:time)
> **** 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 ?
The function can handle missing values in variables that are not used
in the model, but it cannot handle missing values in the response and
covariates that are used in the fixed effects or random effects model,
as these would propagate in the calculations. It is not clear from
your question where the missing values occur and what you expect that
should happen. If your missing values occur in "harmless variables",
you can specify na.action = na.include to preserve the data
structure. Perhaps you can be a bit more specific about your missing
values structure and how you expected them to be handled.
Regards,
--Jose' Pinheiro
-----------------------------------------------------------------------------
Bell Laboratories jcp@research.bell-labs.com
600 Mountain Avenue, Room 2C-258 office: (908) 582-2390
Murray Hill, NJ 07974 fax: (908) 582-3340
-----------------------------------------------------------------------------
-----------------------------------------------------------------------
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
|