The ANOVA command (aov) in R is used to perform the analysis. The output consists of the
ANOVA table, which provides information about the sum of squared errors and treatments,
degrees of freedom, mean sum of squares, F-test, and p-value. Additionally, the model.tables
command provides the overall mean and means for each cancer type.
ANOVA tests equality of means across cancer types.
ANOVA table provides sums of squares, degrees of freedom, F-test, and p-value.
Degrees of freedom: 4 for cancer type, residual for error.
F-value: 4.286, p-value: 0.004.
Model.tables output shows overall and group-specific log survival means.
To compare the means between pairs of cancer types, a pairwise comparison is conducted
using the TukeyHSD command. Confidence intervals for the difference in means are obtained.
The results indicate that the log mean of survival days for breast cancer patients is significantly
larger than for bronchus and stomach cancer patients.
TukeyHSD for pairwise mean comparisons.
Statistically significant differences between two pairs of means.
Comparison of log mean survival days: Breast vs. Bronchus, Breast vs. Stomach.
Confidence intervals only include negative values.
Other pairs not statistically different, suggesting similar survival days.
Assessing the assumptions of ANOVA is crucial for model fit evaluation. Residual analysis is
performed to evaluate the assumptions of constant variance, independence, and normality. The
quantile-normal plot and histogram show that the residuals have an approximately normal
distribution, and there is no clear pattern in the residuals.
Residual analysis assesses assumptions.
Assumptions: constant variance, independence, normality.
Quantile normal plot and histogram evaluate normality.
Residuals appear normally distributed.
No patterns observed in residual plots.
Based on the ANOVA analysis, it is concluded that there is strong evidence of differences in
survival days among the five types of cancer. Specifically, the survival time is significantly
different for patients with breast cancer compared to those with bronchus or stomach cancer.