Skip to content
Prev 44799 / 398506 Next

lme - problems with model

As Spencer Graves suggested, I tried this with continuous variables.  Seems to work ok:
Linear mixed-effects model fit by REML
  Data: milk 
  Log-restricted-likelihood: -10.57237
  Fixed: maill6 ~ water * temp 
 (Intercept)        water         temp   water:temp 
-1.107227891  0.928965420  0.032507653 -0.008792517 

Random effects:
 Formula: ~1 | rep
        (Intercept)  Residual
StdDev:   0.1358565 0.2189339

Number of Observations: 27
Number of Groups: 3

For the smaller model, I get:
Linear mixed-effects model fit by REML
  Data: milk 
  Log-restricted-likelihood: -8.068963
  Fixed: maill6 ~ water + temp 
(Intercept)       water        temp 
 1.17083333 -0.05819444  0.01212500 

Random effects:
 Formula: ~1 | rep
        (Intercept)  Residual
StdDev:   0.1328748 0.2348303

Number of Observations: 27
Number of Groups: 3 

Cheers,
Dick
*******************************************************************************
Richard P. Beyer, Ph.D.	University of Washington
Tel.:(206) 616 7378	Env. & Occ. Health Sci. , Box 354695
Fax: (206) 685 4696	4225 Roosevelt Way NE, # 100
			Seattle, WA 98105-6099
http://depts.washington.edu/ceeh/ServiceCores/FC5/FC5.html
*******************************************************************************

Message: 14
Date: Mon, 23 Feb 2004 07:41:07 -0800
From: Spencer Graves <spencer.graves at pdf.com>
Subject: Re: [R] lme - problems with model
To: CG Pettersson <cg.pettersson at evp.slu.se>
Cc: Douglas Bates <bates at stat.wisc.edu>, r-help at stat.math.ethz.ch
Message-ID: <403A1F13.7000008 at pdf.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

      If you want to try to get the same answers as PROC MIXED, I 
suggest you try to figure out how SAS codes interactions and which ones 
it retains.  Then you can try code those manually and include them as 
separate explanatory variables, e.g., I((water=="2")&(temp==110)).  You 
could work this out in "lm" then try the result on "lme". 

      An alternative would be to convert "temp" from a factor to a 
continuous variable.  I would make plots of the response variables vs. 
"temp" with different lines and symbols for "water" and "rep" to make 
sure I had something that was mostly linear in some transformation of 
"temp". 

      hope this helps. 
      spencer graves
CG Pettersson wrote: