Skip to content
Prev 274619 / 398506 Next

pdIdent in smoothing regression model

On Sun, 2011-10-09 at 10:25 -0400, Lei Liu wrote:
I'm not going to try to fix this nor work out how to do it via lme(),
but just wanted to note that you can use mgcv:::gam() for example to fit
something very similar.

require(SemiPar)
require(mgcv)

data(fossil)
mod <- gam(strontium.ratio ~ s(age), data = fossil,
           method = "REML")

That is treating the smoothness terms as random effects.

Also note that Matt Wand wrote the SemiPar package as support software
for the book Semiparametric Regression, where these example data are
taken from: