Skip to content
Prev 343483 / 398525 Next

Issue with formula conversion

On Aug 27, 2014, at 1:33 PM, Richard M. Heiberger wrote:

            
I doubt that would work, since it is not a formula object.
After correcting the misspelling of the function name, I tested this approach:

 BlockFunction <- "pdCompSymm"
 ranEff1 <- as.formula("~Variety -1")
 fm <- lme(yield ~ nitro, data=Oats, random=list(Block=do.call(BlockFunction, list(form=ranEff1) )
  ))
 fm
#----------
Linear mixed-effects model fit by REML
  Data: Oats 
  Log-restricted-likelihood: -296.5209
  Fixed: yield ~ nitro 
snipped