R: A function for smoothing under multivariate t response...
smoothed.heavy
R Documentation
A function for smoothing under multivariate t response distribution
Description
Smooths random components of the mixed model with a stationary or non-stationary stochastic process
component, under multivariate t response distribution
a typical R formula for the fixed effects component of the model
data
a data frame from which the variables are to be extracted
id
a vector for subject identification
process
a character string, "bm" for Brownian motion, "ibm" for
integrated Brownian motion, "iou" for integrated
Ornstein-Uhlenbeck process, "sgp-powered-power-method" for
stationary process with powered correlation function, and
"sgp-matern-kappa" for stationary process with Matern correlation function
timeVar
a vector for the time variable
estimate
a vector for the maximum likelihood estimates
subj.id
a vector of IDs of the subject for whom smoothing is to be carried out
Details
For details of "process" see lmenssp
Value
Returns the results as lists for the random intercept and
stochastic process
Author(s)
Ozgur Asar, Peter J. Diggle
References
Asar O, Ritchie J, Kalra P, Diggle PJ (2015) Acute kidney injury amongst chronic kidney disease
patients: a case-study in statistical modelling. To be submitted.
Pinheiro JC, Liu C, Wu YN. (2001) Efficient algorithms for robust estimation in linear mixed-effects
models using the multivariate t distribution. Journal of Computational and Graphical Statistics10, 249-276.
Examples
# loading the data set and subsetting it for the first 20 patients
# for the sake illustration of the usage of the functions
data(data.sim.ibm.heavy)
data.sim.ibm.heavy.short <- data.sim.ibm.heavy[data.sim.ibm.heavy$id <= 20, ]
# a formula to be used
formula <- log.egfr ~ sex + bage + fu + pwl
# estimating the parameters
# tol.em is set to 10^-1 only for illustration, decrease it in your applications
fit.heavy <- lmenssp.heavy(formula = formula, data = data.sim.ibm.heavy.short,
id = data.sim.ibm.heavy.short$id, timeVar = data.sim.ibm.heavy.short$fu, init.em = 5,
maxiter.em = 1000, tol.em = 10^-1,
process = "ibm", silent = FALSE, dof.est = c(0.1, 10, 0.0001), tol.cd = 0.001,
tol.lmenssp = 10^-5, silent.lmenssp = FALSE)
fit.heavy
# smoothing for the patients with ID = 1, 2, 3, 4
smo.heavy <- smoothed.heavy(formula = formula, data = data.sim.ibm.heavy.short,
id = data.sim.ibm.heavy.short$id, process = "ibm", timeVar = data.sim.ibm.heavy.short$fu,
estimate = fit.heavy$est, subj.id = c(1, 2, 3, 4))
smo.heavy