nlme completely ignores my fixed effects specification

  Kiến thức lập trình

I am trying to follow along with the book by Pinheiro and Bates on the Mixed Effects Models in S and S-PLUS (2000). I am looking at the CO2 data set covered on page 368. Unlike, the book I cannot get a model to fit with fixed effects. My syntax looks correct to me but nlme just seems to ignore it in favor of the intercepts model. Because in the change in default contrasts, I couldn’t just trust the starting values in the book either, so it seems better to me to just keep refitting during model exploration. Here was my attempt:

library(nlme)

fit = nlme(
  model = uptake ~ SSasympOff(conc, Asym, lrc, c0),
  fixed = list(Asym + lrc ~ Type*Treatment, c0 ~ 1),
  random = pdDiag(Asym + lrc ~ 1),
  data = CO2
)

The code runs almost immediately. Here is the summary output:

Nonlinear mixed-effects model fit by maximum likelihood
  Model: uptake ~ SSasympOff(conc, Asym, lrc, c0) 
  Data: CO2 
       AIC      BIC    logLik
  422.4629 437.0478 -205.2314

Random effects:
 Formula: list(Asym ~ 1, lrc ~ 1)
 Level: Plant
 Structure: Diagonal
            Asym       lrc
StdDev: 9.368036 0.1276607
        Residual
StdDev:   1.8738

Fixed effects:  list(Asym ~ 1, lrc ~ 1, c0 ~ 1) 
        Value Std.Error DF
Asym 32.50411  2.773180 70
lrc  -4.62323  0.078020 70
c0   48.78844  4.505287 70
       t-value p-value
Asym  11.72088       0
lrc  -59.25699       0
c0    10.82915       0
 Correlation: 
    Asym   lrc   
lrc -0.062       
c0  -0.039  0.709

Standardized Within-Group Residuals:
         Min           Q1 
-3.022221877 -0.544281746 
         Med           Q3 
-0.007987842  0.565828464 
         Max 
 2.745743578 

Number of Observations: 84
Number of Groups: 12 

What gives? What is making nlme is so pig headed about including the fixed effects I specified? I am using R 4.3.3 with nlme 3.1.

LEAVE A COMMENT