Smoothing-splines mixed-effects models

Share:

Description

This generic function fits a smoothing-splines mixed-effects model

Usage

1
2
sme(object,tme,ind,verbose=F,lambda.mu=NULL,lambda.v=NULL,maxIter=500,
knots=NULL,zeroIntercept=F,deltaEM=1e-3,deltaNM=1e-3,criteria="AICc",...)

Arguments

object

either a vector of observations, a data.frame object or a list of vectors of observations. The method functions sme.data.frame and sme.list are documented separately

tme

either a vector of time points corresponding to the observations given in object or a list of vectors of time points in the case of sme.list. Ignored in the case of sme.data.frame

ind

a factor (or a vector that can be coerced to a factor) of subject identifiers corresponding to the observations given in object or a list of factors of subject identifiers in the case of sme.list. Ignored in the case of sme.data.frame

verbose

if TRUE, debug information will be output while fitting the model

lambda.mu

smoothing parameter used for the fixed-effect function. If NULL, the optimal values for this and lambda.v will be found according to criteria using Nelder-Mead search

lambda.v

smoothing parameter used for the random-effects functions. If NULL, the optimal values for this and lambda.mu will be found according to criteria using Nelder-Mead search

maxIter

maximum number of iterations to be performed for the EM algorithm

knots

location of spline knots. If NULL, an incidence matrix representation will be used. See ‘Details’

zeroIntercept

experimental feature. If TRUE, the fitted values of the fixed- and random-effects functions at the intercept will be zero

deltaEM

convergence tolerance for the EM algorithm

deltaNM

(relative) convergence tolerance for the Nelder-Mead optimisation

criteria

one of "AICc", "AIC", "BICN" or "BICn" indicating which criteria to use to score a particular combination of lambda.mu and lambda.v in the Nelder-Mead search

...

additional arguments to sme.data.frame or sme.list

Details

The default behaviour is to use an incidence matrix representation for the smoothing-splines. This works well in most situations but may incur a high computational cost when the number of distinct time points is large, as may be the case for irregularly sampled data. Alternatively, a basis projection can be used by giving a vector of knots of length (much) less than the number of distinct time points.

Value

An object of class sme representing the smoothing-splines mixed-effects model fit. See smeObject for the components of the fit and plot.sme for visualisation options

Author(s)

Maurice Berk maurice.berk01@imperial.ac.uk

References

Berk, M. (2012). Smoothing-splines Mixed-effects Models in R. Preprint

See Also

smeObject, sme.data.frame, sme.list, plot.sme

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
  data(MTB)
  fit.AIC <- sme(MTB[MTB$variable==6031,c("y","tme","ind")],criteria="AIC")
  fit.BICN <- sme(MTB[MTB$variable==6031,c("y","tme","ind")],criteria="BICN")
  fit.BICn <- sme(MTB[MTB$variable==6031,c("y","tme","ind")],criteria="BICn")
  fit.AICc <- sme(MTB[MTB$variable==6031,c("y","tme","ind")],criteria="AICc")

  fit <- sme(MTB[MTB$variable==6031,c("y","tme","ind")],lambda.mu=1e5,lambda.v=1e5)

  data(inflammatory)
  system.time(fit <- sme(inflammatory,knots=c(29.5,57,84.5),deltaEM=0.1,deltaNM=0.1))