Description Usage Arguments Details Value Author(s) Examples
Calculates bootstrap standard errors for the parameter estimates obtained
by lmenssp
when Nelder-Mead algorithm is used
1 2 |
formula |
a typical |
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 |
matern |
a logical variable, |
kappa.or.power |
a numerical value for the shape parameter, it corresponds to κ if |
nboot |
a numerical value for number of bootstrap sample |
tol.lmenssp |
a numerical value for the tolerance, to be passed to |
maxiter.lmenssp |
a numerical value for the maximum number of iterations, to be passed to |
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.
Returns a list of results
Ozgur Asar, Peter J. Diggle
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | # 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
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.