Description Usage Arguments Details Value Author(s) References See Also Examples
spm
is used to fit semiparametric
regression models using the mixed model
representation of penalized splines
(per Ruppert, Wand and Carroll, 2003).
1 2 |
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. |
See the SemiPar Users' Manual for details and examples.
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. |
M.P. Wand mwand@uow.edu.au (other contributors listed in SemiPar Users' Manual).
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
gam
(in package ‘mgcv’)
lme
(in package ‘nlme’)
glmmPQL
(in package ‘MASS’)
plot.spm
summary.spm
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
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.