ks_test | R Documentation |
Warning: EXPERIMENTAL Compute the Kolmogorov-Smirnov test statistic and compare it with a simulated null distribution obtained via a parametric bootstrap.
ks_test(
time,
time2 = NULL,
event = NULL,
thresh = 0,
ltrunc = NULL,
rtrunc = NULL,
type = c("right", "left", "interval", "interval2"),
family = c("exp", "gp", "gomp", "gompmake", "weibull", "extgp", "gppiece",
"extweibull", "perks", "beard", "perksmake", "beardmake"),
B = 999L,
arguments = NULL,
...
)
time |
excess time of the event of follow-up time, depending on the value of event |
time2 |
ending excess time of the interval for interval censored data only. |
event |
status indicator, normally 0=alive, 1=dead. Other choices are |
thresh |
vector of thresholds |
ltrunc |
lower truncation limit, default to |
rtrunc |
upper truncation limit, default to |
type |
character string specifying the type of censoring. Possible values are " |
family |
string; choice of parametric family |
B |
number of bootstrap simulations |
arguments |
a named list specifying default arguments of the function that are common to all |
... |
additional parameters, currently ignored |
a list with elements
stat
the value of the test statistic
pval
p-value obtained via simulation
The bootstrap scheme requires simulating new data, fitting a parametric model and estimating the nonparametric maximum likelihood estimate for each new sample. This is computationally intensive in large samples.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.