Description Usage Arguments Value See Also Examples
ptwiseELtest
gives pointwise EL testing to compare the survival curves at
each time point.
1 2 3 4 5 6 7 8 9 10 11 12 |
formula |
a formula object with a |
data |
an optional data frame containing the variables in the |
group_order |
a k-vector containing the values of the grouping variable, with the j-th element being the group hypothesized to have the j-th highest survival rates, j=1,…,k. The default is the vector of sorted grouping variables. |
t1 |
the first endpoint of a prespecified time interval, if any, to which the comparison of the survival functions is restricted. The default value is 0. |
t2 |
the second endpoint of a prespecified time interval, if any, to which the comparison of the survival functions is restricted. The default value is ∞. |
sided |
2 if two-sided test, and 1 if one-sided test. The default value is 2. |
nboot |
the number of bootstrap replications in calculating critical values for the tests. The default value is 1000. |
alpha |
the pre-specified significance level of the tests. The default value is 0.05. |
seed |
the seed for the random number generator in |
nlimit |
a number used to calculate |
ptwiseELtest
returns a ptwiseELtest
object, a list with 12 elements:
call
the function call
result_dataframe
a dataframe with time_pts
in the first column, decision
in the second column, stat_ptwise
in the third column and critval_ptwise
in the fourth column.
time_pts
a vector containing the observed uncensored time points at which the
Kaplan—Meier estimate is positive and less than 1 for each sample.
decision
a vector containing the decisions of the pointwise EL tests at time_pts
.
The decision at each of time_pts
is 1 for rejection of the null hypothesis that the survival
functions are the same at the specific time point, and 0 otherwise.
stat_ptwise
a vector containing the pointwise EL statistics at time_pts
.
critval_ptwise
a vector containing the critical values for pointwise EL testing
at time_pts
.
formula
the value of the input argument of ptwiseELtest
data
the value of the input argument of ptwiseELtest
group_order
the value of the input argument of ptwiseELtest
t1
the value of the input argument of ptwiseELtest
t2
the value of the input argument of ptwiseELtest
sided
the value of the input argument of ptwiseELtest
nboot
the value of the input argument of ptwiseELtest
alpha
the value of the input argument of ptwiseELtest
seed
the value of the input argument of ptwiseELtest
nlimit
the value of the input argument of ptwiseELtest
Methods defined for ptwiseELtest
objects are provided for print
and summary
.
hepatitis
, intELtest
, supELtest
, nocrossings
, print.ptwiseELtest
, summary.ptwiseELtest
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | library(survELtest)
ptwiseELtest(survival::Surv(hepatitis$time, hepatitis$censor)~
hepatitis$group, sided = 1)
## OUTPUT:
## Call:
## ptwiseELtest(formula = survival::Surv(hepatitis$time, hepatitis$censor) ~
## hepatitis$group, sided = 1)
##
## Range of time_pts is from 5.2 to 153.1
## 30 out of 45 decisions are 1, the other 15 decisions are 0
## -----
## Summary of stat_ptwise:
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 0.000 2.293 3.694 4.263 6.288 10.360
## -----
## Summary of critval_ptwise:
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 2.117 2.346 2.483 2.509 2.669 2.951
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.