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 numerical vector for subject identification
timeVar
a numerical vector for the time variable
result
a matrix of results obtained by lmenssp, see the example below
matern
a logical variable, TRUE corresponds to Matern correlation function, FALSE corresponds to powered
correlation function
kappa.or.power
a numerical value for the shape parameter, it corresponds to κ if matern = TRUE
and φ if matern = FALSE
nboot
a numerical value for number of bootstrap sample
tol.lmenssp
a numerical value for the tolerance, to be passed to lmenssp
maxiter.lmenssp
a numerical value for the maximum number of iterations, to be passed to lmenssp
Details
This function consider parametric bootstrap based on the fitted model.
The recommended number of bootstrap replications is at least 100.
For the details of κ and φ in kappa.or.power,
see the details section of lmenssp function.
Value
Returns a list of results
Author(s)
Ozgur Asar, Peter J. Diggle
Examples
# loading the data set and subsetting it for the first 5 patients
# for the sake illustration of the usage of the functions
data(data.sim.ibm)
data.sim.ibm.short <- data.sim.ibm[data.sim.ibm$id <= 5, ]
# model formula to be used below
formula <- log.egfr ~ sex + bage + fu + pwl
# fitting the mixed model with Matern, kappa = 0.5
fit.matern <- lmenssp(formula = formula, data = data.sim.ibm.short,
id = data.sim.ibm.short$id, process = "sgp-matern-0.5", timeVar = data.sim.ibm.short$fu,
init = c(-13, 1, -1), silent = FALSE)
fit.matern
# bootstrapping the standard errors, nboot is set to 2 for illustration
# set nboot to at least 100 in your applications
fit.matern.boot <- boot.nm(formula = formula, data = data.sim.ibm.short,
id = data.sim.ibm.short$id, timeVar = data.sim.ibm.short$fu,
result = fit.matern$est, matern = TRUE, kappa.or.power = 0.5,
nboot = 2)
fit.matern.boot