[R] PBIB datataset

Douglas Bates bates at stat.wisc.edu
Mon Dec 20 03:06:16 CET 2004


(Ted Harding) wrote:
> Thanks, Austin, I think that probably clears it up (see below).
> 
> On 19-Dec-04 Austin, Matt wrote:
> 
>>Is it the PBIB dataset in the SASmixed package?  I don't have
>>my copy of the text at home.
>>
>>--Matt
>>
>>
>>>library(SASmixed)
>>
>>Loading required package: lme4 
>>
>>Attaching package 'lme4':
>>
>>        The following object(s) are masked from package:nlme :
>>
>>         Alfalfa Assay bdf BodyWeight Cefamandole Dialyzer
>>Earthquake ergoStool Fatigue Gasoline getCovariateFormula
>>getResponseFormula Glucose Glucose2 Gun IGF lmeControl Machines
>>MathAchieve MathAchSchool Meat Milk Muscle Nitrendipene Oats
>>Orthodont Ovary Oxboys Oxide PBG Phenobarb Pixel Quinidine Rail
>>RatPupWeight Relaxin Remifentanil Soybean Spruce Tetracycline1
>>Tetracycline2 Wafer Wheat Wheat2 
> 
> 
> The dataset names in the above masked objects are the entire
> list of datasets in P&B except for CO2, ChickWeight, DNase,
> Indometh, Loblolly, Orange and Theoph, and also PBIB. All of
> these except PBIB can be found elsewhere, but (as you show
> below) PBIB can be found in SASmixed and so completes the party.
> 
> However, SASmixed itself cannot be found the the R Full Reference
> Manual (of 25 Nov 2004) either ... the dates on the current
> versions of lme3 and SASmixed are 2004-12-16 and 2004-12-15
> respectively. Now that I try it (today), the "R Site Search" of
> Jonathan Baron does bring it up.
> 
> Thanks for helping to clarify this!
> Ted.

This is a new version of SASmixed that was uploaded a couple of days 
ago.  I changed it so that the fits are done with the lme4 version of 
lme.  It should be faster and more reliable than the version of lme in 
the nlme package.

This version of SASmixed has a vignette that provides comparative 
analyses in lme for the examples in "SAS System for Mixed Models".  The 
specification of models in the new lme is occasionally different from 
the older specification.  Don't pay too much attention to the textual 
descriptions - look at the examples in the appendices.  I haven't 
finished rewriting the textual description from an old, old version.

Those who (like me) cringe at the way that models with crossed random 
effects needed to be specified in the old lme may find it interesting 
that the Demand example now specifies the model fit as
Demand> fm1Demand <- lme(log(d) ~ log(y) + log(rd) + log(rt) +
     log(rs), data = Demand, random = list(State = ~1, Year = ~1))

Demand> summary(fm1Demand)
Linear mixed-effects model fit by REML
Fixed: log(d) ~ log(y) + log(rd) + log(rt) + log(rs)
  Data: Demand
        AIC       BIC   logLik
  -224.1653 -205.4148 120.0826

Random effects:
  Groups   Name        Variance   Std.Dev.
  Year     (Intercept) 0.00026465 0.016268
  State    (Intercept) 0.02948900 0.171724
  Residual             0.00111705 0.033422
# of obs: 77, groups: Year, 11; State, 7

Fixed effects:
              Estimate Std. Error DF t value  Pr(>|t|)
(Intercept) -1.284043   0.723423 72 -1.7750  0.080132 .
log(y)       1.069806   0.103925 72 10.2941 8.553e-16 ***
log(rd)     -0.295342   0.052463 72 -5.6296 3.265e-07 ***
log(rt)      0.039882   0.027889 72  1.4300  0.157034
log(rs)     -0.326739   0.114385 72 -2.8565  0.005595 **
---
Signif. codes:  0 `***' 0.001 `**' 0.01 `*' 0.05 `.' 0.1 ` ' 1

Correlation of Fixed Effects:
         (Intr) log(y) lg(rd) lg(rt)
log(y)  -0.976
log(rd)  0.383 -0.227
log(rt)  0.077 -0.062 -0.337
log(rs)  0.444 -0.600 -0.270 -0.323


The lme4 and nlme packages should not be loaded simultaneously.  Use one 
or the other but not both.




More information about the R-help mailing list