[R] nlme & SASmixed in 2.0.1
Deepayan Sarkar
deepayan at stat.wisc.edu
Wed Apr 6 02:19:22 CEST 2005
On Tuesday 05 April 2005 18:40, Murray Jorgensen wrote:
> I assigned a class the first problem in Pinheiro & Bates, which uses
> the data set PBIB from the SASmixed package. I have recently
> downloaded 2.0.1 and its associated packages. On trying
>
> library(SASmixed)
> data(PBIB)
> library(nlme)
> plot(PBIB)
>
> I get a warning message
> Warning message:
> replacing previous import: coef in: namespaceImportFrom(self,
> asNamespace(ns))
>
> after library(nlme) and a "pairs" type plot of PBIB.
SASmixed now depends on lme4, which conflicted (until recently) with
nlme. If you had your calls to library(SASmixed) and library(nlme)
reversed, you probably would have gotten a warning.
I think the simplest thing you can do is not to load SASmixed at all.
Instead, use
data(PBIB, package = "SASmixed")
However, these datasets are (for all practical purposes) vanilla data
frames, and you won't get trellis-style plots unless you create nlme
groupedData objects yourself. (You should get them if you load the
latticeExtra package manually, and then use 'gplot' instead of 'plot'
to plot them.)
Deepayan
> Pressing on I get:
> > lme1 <- lme(response ~ Treatment, data=PBIB, random =~1| Block)
> > summary(lme1)
>
> Error: No slot of name "rep" for this object of class "lme"
> Error in deviance(object at rep, REML = REML) :
> Unable to find the argument "object" in selecting a method
> for function "deviance"
>
>
> Everything works fine under 1.8.1 and plot(PBIB) is of trellis style,
> which is what I think the authors intend.
>
> Cheers, Murray Jorgensen
More information about the R-help
mailing list