Description Usage Arguments Details Value Note Author(s) References See Also Examples
Takes one or two vectors of event times (numeric format) and optionally corresponding vectors of indicator variables to designate right-censored events. Fits several mortality models, selects the best fitting one/s, and if two vectors were given, tests hypotheses about the model parameters.
1 |
x |
A numeric vector of event times. For example, number of days an individual has survived. |
y |
An optional second numeric vector of event times, in the same units as
|
models |
A character vector of model names: |
cx |
A vector of 0 and 1 the same length as |
cy |
A vector of 0 and 1 the same length as |
ext |
Not implemented. |
n |
Total sample size. Should normally be left for the script to automatically calculate, but can be specified when survwrapper is called from another script repeatedly in order to speed up runtimes. |
AIC |
Whether to calculate the AIC (Akaike Information Criterion) for each candidate model. |
BIC |
Whether to calculate the BIC (Bayes Information Criterion) for each candidate model. |
breakties |
What criterion to use for choosing a model if more than one is justified by the comparisons. |
compare.matrix |
A matrix for specifying a customized comparison algorithm. |
constraint.matrix |
A matrix of 1's and 0's for specifying a customized set of parameter constraints to test. |
thresh |
Significance cutoff. |
smooth |
Not yet supported. |
This function takes vectors (assumed to be times-to-event) and uses
numerical methods to find maximum likelihood estimates of model
parameters for a one or more models (by default, these are exponential,
Gompertz, Gompertz-Makeham, logistic, and Logistic-Makeham). Censored
events can be specified with the cx
and cy
arguments,
which should be vectors of 1's and 0's the same length as x
and
y
, respectively. If both x
and y
are specified, the
best joint model/s are chosen (such that the same type of model is
fitted to both populations, and the likelihood ratio between this joint model
and the corresponding joint model but one fewer parameter is
significantly different from 1 according to the chi-squared
distribution). Then, for each parameter in the model/s so chosen, a test
is performed on the null hypothesis that constraining the parameter
such that it is identical between the two populations will result in a
joint model that does not fit significantly worse than the full
model. If this null hypothesis is rejected, the interpretation is that
the corresponding parameter significantly differs between
populations. The null hypothesis of all parameters not being significantly
different is also tested by default. The user can also specify which
hypotheses to test.
x.m |
A data frame containing a column for the log-likelihood and each of the model parameter estimates. Each model fitted is represented by its own row. |
y.m |
If |
xy.sm |
If |
par.differences |
IN PROGRESS |
x |
The original values in the |
y |
The original values in the |
cx |
The original values in the |
cy |
The original values in the |
x.d |
IN PROGRESS |
y.d |
IN PROGRESS |
suggested.models |
A string with the abbreviation of the joint model/s chosen for hypothesis testing. |
nx |
An integer representing the sample size of the |
ny |
An integer representing the sample size of the |
Uses Nelder-Mead algorithm to find maximum likelihood estimates of model parameters.
Alex F. Bokov (bokov@uthscsa.edu), Jon A. Gelfond
Pletcher,S.D., Khazaeli,A.A., and Curtsinger,J.W. (2000). Why do life spans differ? Partitioning mean longevity differences in terms of age-specific mortality parameters. Journals of Gerontology Series A-Biological Sciences and Medical Sciences 55, B381-B389
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.