spm: Fit a SemiParametric regression Model

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

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

Usage

1
2
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 mwand@uow.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://matt-wand.utsacademics.info/SPmanu.pdf

See Also

gam (in package ‘mgcv’) lme (in package ‘nlme’) glmmPQL (in package ‘MASS’) plot.spm summary.spm

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
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:
#
#     http://matt-wand.utsacademics.info/SPmanu.pdf

Example output

Summary for non-linear components:

          df  spar knots
f(age) 12.15 2.927    25

Note this includes 1 df for the intercept.




Summary for non-linear components:

                                df    spar knots
f(daggett.pressure.gradient) 4.697   88.80    31
f(inversion.base.height)     4.198 2741.00    39
f(inversion.base.temp)       3.248   57.99    38

SemiPar documentation built on May 2, 2019, 5:42 a.m.

Related to spm in SemiPar...