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. |
In progress.
x.m |
|
y.m |
|
xy.sm |
|
par.differences |
|
x |
|
y |
|
cx |
|
cy |
|
x.d |
|
y.d |
|
suggested.models |
|
nx |
|
ny |
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 | ## Generate two sets of survival times.
population1 <- simsurv(629,type='g',p=c(7.33e-4,0.1227,0,0));
population2 <-
simsurv(574,type='lm',p=c(5.4818e-5,0.1543,0.0023,0.6018));
## Fit models to the populations and compare the parameters.
models1vs2 <- survwrapper(population1,population2);
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.