Learn R Programming

lmms (version 1.3.3)

deriv.lmmspline: Derivative information for lmmspline objects

Description

Calculates the derivative information for lmmspline objects with a "p-spline" or "cubic p-spline" basis.

Usage

"deriv"(expr, ...)

Arguments

expr
An object of class lmmspline.
...
Additional arguments which are passed to deriv.

Value

deriv returns an object of class lmmspline containing the following components:
predSpline
data.frame containing the predicted derivative values based on the linear model object or the linear mixed effect model object.
modelsUsed
numeric vector indicating the model used to fit the data. 0 = linear model, 1 = linear mixed effect model spline (LMMS) with defined basis ("cubic" by default), 2 = LMMS taking subject-specific random intercept, 3 = LMMS with subject specific intercept and slope.
model
list of models used to model time profiles.
derivative
logical value indicating if the predicted values are the derivative information.

Examples

Run this code
## Not run: 
# data(kidneySimTimeGroup)
# # run lmmSpline on the samples from group 1 only
# G1 <- which(kidneySimTimeGroup$group=="G1")
# testLMMSplineTG<- lmmSpline(data=kidneySimTimeGroup$data[G1,],
#                   time=kidneySimTimeGroup$time[G1],
#                   sampleID=kidneySimTimeGroup$sampleID[G1],
#                   basis="p-spline",keepModels=T)
# testLMMSplineTGDeri <- deriv(testLMMSplineTG)
# summary(testLMMSplineTGDeri)## End(Not run)

Run the code above in your browser using DataLab