# NOT RUN {
# Proportion of renal stone (calculi) across age
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# Data
xtab <- as.table(rbind(
c(384, 536, 335),
c(951, 869, 438)
))
dimnames(xtab) <- list(
stone = c("yes", "no"),
age = c("30-39", "40-49", "50-59")
)
xtab
# Compare the proportion of survived between groups
prop_trend_test(xtab)
# }
Run the code above in your browser using DataLab