Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Use this data: melanoma.csvDownload melanoma.csv # You want to conduct a Chi Square Test of Independence for sex and status of melanoma. The Melanoma data
Use this data:
melanoma.csvDownload melanoma.csv
# You want to conduct a Chi Square Test of Independence for sex and status of melanoma. The Melanoma data frame has data on patients in Denmark with malignant melanoma. Melanoma is skin cancer caused by too much sunlight. Data are deidentified and publicly available.
# Data variables are:
# time: survival time in days, possibly censored.
# status: died from melanoma, alive, dead from other causes
# sex: male, female
# age: age in years
# year: of operation
# thickness: tumour thickness in mm
# ulcer: presence, absence
# Source: P K Andersen, O Borgan, R D Gill and N Keiding Statistical Models based on Counting Processes. Springer.
Directions:
# import the data
# display data information
# display head of data
# replace sex values and with female and male respectively
# replace statue died from melanoma, alive, dead from other causes with their text labels
# display head of data
# create a cross table two way table of sex and status
# conduct the Chi Square Test of Independence for sex and status.
# print the p value from the Chi Square Test
# State the conclusion from the test
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started