h1(t): survival rates of patients with cancer of the tongue (aneuploid tumor)
h2(t): survival rates of patients with cancer of the tongue (diploid tumor)
H0: h1(t) = h2(t) Ha: not H0
test statistic:
Under H0, the test statistics follows a chi-square distribution. We estimate test statistics by using weight function W(t)=1.
## Loading required package: splines
## Call:
## survdiff(formula = Surv(time, delta) ~ factor(type), rho = 0)
##
## N Observed Expected (O-E)^2/E (O-E)^2/V
## factor(type)=1 52 31 36.6 0.843 2.79
## factor(type)=2 28 22 16.4 1.873 2.79
##
## Chisq= 2.8 on 1 degrees of freedom, p= 0.0949
The value of the test statistic is 2.8 and the p-value is 0.0949, so we can not reject the null hypothesis that the survival rates of patients with cancer of the tongue are the same for patients with aneuploid and diploid tumors.
We can use Peto & Peto test in this problem, because it gives a heavier weight on earlier time. We can replace the weight function in (a) by , then do the same calculation.
## Call:
## survdiff(formula = Surv(time, delta) ~ factor(type), rho = 1)
##
## N Observed Expected (O-E)^2/E (O-E)^2/V
## factor(type)=1 52 20.2 24.4 0.731 3.3
## factor(type)=2 28 15.1 10.9 1.643 3.3
##
## Chisq= 3.3 on 1 degrees of freedom, p= 0.0694
The test statistic is equal to 3.3 and the p-value is 0.0694. We also can not reject the null hypothesis.
H0: h1(t) = h2(t) Ha: not H0
test statistic:
Under H0, the test statistics can be approximate by sup(|B(x)|, 0<=x<=1), where B(x) has a standard Brownian motion process.
The value of Renyi type test statistics is 1.79, which gives a p-value of 0.15. The null hypothesis is not rejected and h1(t) = h2(t)
We get Renyi test statistics with value of 2.03 and p-value 0.08, which also can not reject the null hypothesis. There is no difference between two hazard function.
H0: the hazard rate for the three groups are same Ha: the hazard rate for the three groups are not same
test statistics:
Under H0, the test statistics follows a chi-square distribution. We use log rank weight function W(t)=1.
## Call:
## survdiff(formula = Surv(ta, da) ~ factor(group), data = bmt,
## rho = 0)
##
## N Observed Expected (O-E)^2/E (O-E)^2/V
## factor(group)=1 38 9 7.42 0.336 0.472
## factor(group)=2 54 11 9.90 0.121 0.197
## factor(group)=3 45 6 8.67 0.825 1.244
##
## Chisq= 1.3 on 2 degrees of freedom, p= 0.525
The result of chi-square is 10.4, and p-value is 0.00564, Which indicates the null hypothesis is rejected. The hazard rate for the three groups are not same
H0: the hazard rate for the three groups are same Ha: the hazard rate for the three groups are not same
test statistics:
Under H0, the test statistics follows a chi-square distribution.
## Call:
## survdiff(formula = Surv(t2, d2) ~ factor(group), data = bmt,
## rho = 0)
##
## N Observed Expected (O-E)^2/E (O-E)^2/V
## factor(group)=1 38 12 11.2 0.0625 0.0854
## factor(group)=2 54 9 20.2 6.1851 12.0778
## factor(group)=3 45 21 10.7 10.0122 13.5301
##
## Chisq= 16.5 on 2 degrees of freedom, p= 0.000263
Chi-square is equal t0 16.5, p-value is 0.000263. The null hypothesis is rejected. There is a strong evidence that the hazard rate for the three groups are not same.
H0: the hazard rate of replase for the three groups who developed aGVHD are same Ha: the hazard rate of replase for the three groups who developed aGVHD are not same
test statistics:
Under H0, the test statistics follows a chi-square distribution.
## Call:
## survdiff(formula = Surv(t2, d2) ~ factor(group), data = subset(bmt,
## da == 1), rho = 0)
##
## N Observed Expected (O-E)^2/E (O-E)^2/V
## factor(group)=1 9 2 1.972 0.000411 0.000684
## factor(group)=2 11 1 2.450 0.858469 1.696685
## factor(group)=3 6 2 0.578 3.497169 3.976827
##
## Chisq= 4.4 on 2 degrees of freedom, p= 0.112
We get a chi-square value of 0.7 and p-value 0.714, the null hypothesis is not rejected.The hazard rate of replase for the three groups who developed aGVHD are same