spm {SemiPar}R Documentation

Fit a SemiParametric regression Model

Description

spm is used to fit semiparametric regression models using the mixed model representation of penalized splines (per Ruppert, Wand and Carroll, 2003).

Usage

spm(form,random=NULL,group=NULL,family="gaussian",
                spar.method="REML",omit.missing=NULL)

Arguments

form a formula describing the model to be fit. Note, that an intercept is always included, whether given in the formula or not.
random "random=~1" specifies inclusion of a random intercept according to the groups specified by the "group" argument.
group a vector of labels for specifying groups.
family for specification of the type of likelihood model assumed in the fitting. May be "gaussian","binomial" or "poisson"
spar.method method for automatic smoothing parameter selection. May be "REML" (restricted maximum likelihood) or "ML" (maximum likelihood).
omit.missing a logical value indicating whether fields with missing values are to be omitted.

Details

See the SemiPar Users' Manual for details and examples.

Value

An list object of class "spm" containing the fitted model. The components are:

fit mimics fit object of lme() for family="gaussian" and glmmPQL() for family="binomial" or family="poisson".
info information about the inputs.
aux auxiliary information such as variability estimates.

Author(s)

M.P. Wand wand@maths.unsw.edu.au (other contributors listed in SemiPar Users' Manual).

References

Ruppert, D., Wand, M.P. and Carroll, R.J. (2003)
Semiparametric Regression Cambridge University Press.
http://stat.tamu.edu/~carroll/semiregbook/

Ganguli, B. and Wand, M.P. (2005)
SemiPar 1.0 Users' Manual.
http://www.maths.unsw.edu.au/~wand/papers.html

See Also

gam (in package `mgcv') lme (in package `nlme') glmmPQL (in package `MASS') plot.spm summary.spm

Examples

library(SemiPar)
data(fossil)
attach(fossil)
fit <- spm(strontium.ratio~f(age))
plot(fit)
summary(fit)

data(calif.air.poll)
attach(calif.air.poll)
fit <- spm(ozone.level ~ f(daggett.pressure.gradient)+
                         f(inversion.base.height) +
                         f(inversion.base.temp))
summary(fit)
par(mfrow=c(2,2))
plot(fit)

# The SemiPar User Manual contains several other examples
# and details of plotting parameters.
#
# The current version of the manual is posted on the web-site:
#
#     www.maths.unsw.edu.au/~wand/papers.html 

[Package SemiPar version 1.0-2 Index]