update.mexhaz | R Documentation |
Function allowing the user to update an existing mexhaz model. All the arguments of the model can be updated. If the argument 'init' is not provided, the function uses the estimated values of the existing model as starting values for the corresponding parameters of the new model.
## S3 method for class 'mexhaz'
update(object, formula, data, expected = NULL, base = NULL,
degree = 3, knots = NULL, bound = NULL, n.gleg = 20, init = NULL,
random = NULL, n.aghq = 10, fnoptim = c("nlm", "optim"),
verbose = 0, method = "Nelder-Mead", iterlim = 10000, numHess = FALSE,
print.level = 1, exactGradHess = TRUE, gradtol =
ifelse(exactGradHess, 1e-8, 1e-6), envir = parent.frame(), ...)
object |
an object of class |
formula |
a formula object, with the response on the left of the In case See |
data |
a |
expected |
name of the variable (must be given in quotes) representing the
population (i.e., expected) hazard. By default, |
base |
functional form that should be used to model the baseline
hazard. Selection can be made between the following options:
|
degree |
if |
knots |
if |
bound |
If |
n.gleg |
if |
init |
vector of initial values. By default for the baseline hazard: if if - if - if - if - if the parameters describing the effects of the covariates are all set to 0; the parameter representing the standard deviation of the random
effect is set to 0.1. (if |
random |
name of the variable to be entered as a random effect (must be given
between quotes), representing the cluster membership. By default,
|
n.aghq |
number of quadrature points used for estimating the
cluster-specific marginal likelihoods by adaptive Gauss-Hermite
quadrature. By default, |
fnoptim |
name of the R optimisation procedure used to maximise the
likelihood. Selection can be made between |
verbose |
integer parameter representing the frequency at which the current state
of the optimisation process is displayed. Internally, an 'evaluation' is
defined as an estimation of the log-likelihood for a given vector of
parameters. This means that the number of evaluations is increased each
time the optimisation procedure updates the value of any of the
parameters to be estimated. If |
method |
if |
iterlim |
if |
numHess |
logical value allowing the user to choose between the Hessian returned
by the optimization algorithm (default) or the Hessian estimated by
the |
print.level |
this argument is only used if |
exactGradHess |
logical value allowing the user to decide
whether maximisation of the likelihood should be based on the
analytic gradient and Hessian computed internally (default,
corresponding to |
gradtol |
this argument is only used if |
envir |
environment in which the objects' names given as arguments to the updated model are to be found. |
... |
represents additional parameters directly passed to |
An object of class mexhaz
. See mexhaz
for more details.
Hadrien Charvat, Aurelien Belot
Charvat H, Remontet L, Bossard N, Roche L, Dejardin O, Rachet B, Launoy G, Belot A; CENSUR Working Survival Group. A multilevel excess hazard model to estimate net survival on hierarchical data allowing for non-linear and non-proportional effects of covariates. Stat Med 2016;35:3066-3084 (doi: 10.1002/sim.6881)
mexhaz
data(simdatn1)
## Fit of a mixed-effect excess hazard model, with the baseline hazard
## described by a Weibull distribution (without covariables)
Mod_weib <- mexhaz(formula=Surv(time=timesurv,
event=vstat)~1, data=simdatn1, base="weibull", verbose=0)
## Add an effect of gender
Mod_weib_2 <- update(Mod_weib, formula=~.+IsexH)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.