View source: R/summary.flexsurvreg.R
normboot.flexsurvreg | R Documentation |
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,
tidy = FALSE,
rawsim = NULL
)
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. |
tidy |
If |
rawsim |
allows input of raw samples from a previous run of
|
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).
summary.flexsurvreg
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.