Simulate from the asymptotic normal distribution of parameter estimates.
Produce a matrix of alternative parameter estimates under sampling
uncertainty, at covariate values supplied by the user. Used by
summary.flexsurvreg
for obtaining confidence intervals around
functions of parameters.
normboot.flexsurvreg( x, B, newdata = NULL, X = NULL, transform = FALSE, raw = FALSE )
x |
A fitted model from |
B |
Number of samples. |
newdata |
Data frame or list containing the covariate values to
evaluate the parameters at. If there are covariates in the model, at least
one of |
X |
Alternative (less convenient) format for covariate values: a
matrix with one row, with one column for each covariate or factor contrast.
Formed from all the "model matrices", one for each named parameter of the
distribution, with intercepts excluded, |
transform |
|
raw |
Return samples of the baseline parameters and the covariate effects, rather than the default of adjusting the baseline parameters for covariates. |
If newdata
includes only one covariate combination, a matrix
will be returned with B
rows, and one column for each named
parameter of the survival distribution.
If more than one covariate combination is requested (e.g. newdata
is
a data frame with more than one row), then a list of matrices will be
returned, one for each covariate combination.
C. H. Jackson chris.jackson@mrc-bsu.cam.ac.uk
Mandel, M. (2013). "Simulation based confidence intervals for functions with complicated derivatives." The American Statistician (in press).
fite <- flexsurvreg(Surv(futime, fustat) ~ age, data = ovarian, dist="exp") normboot.flexsurvreg(fite, B=10, newdata=list(age=50)) normboot.flexsurvreg(fite, B=10, X=matrix(50,nrow=1)) normboot.flexsurvreg(fite, B=10, newdata=list(age=0)) ## closer to... fite$res
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.