RailTrail.hightemp and cloudcover is quite small. Would you be sure that the two variables are not related at all? Create scatter plot. After examing the scatter plot, would you conclude that the two variables are not related at all?The data set is from a case-control study of smoking and Alzheimer’s disease. The data set has two variables of main interest:
smoking a factor with four levels “None”, “<10”, “10-20”, and “>20” (cigarettes per day)disease a factor with three levels “Alzheimer”, “Other dementias”, and “Other diagnoses”.The group that has the largest amount of Alzheimers is the group who does not smoke. We can tell this because the none box is the largest in the Alzheimers box.
The only group who has more cases than expected given independence is the other dementias group who smokes more than 20 cigarettes a day. We can see this because this is the only box that is blue.
Smoking does not seem to matter more in determining Alzheimers because the group in Alzheimers that has the largest amount is the group who does not smoke. We can tell this because people who do smoke still have Alzheimers but not as large as someone who doesn’t.
RailTrail.Hint: The RailTrail data set is from the mosaicData package.
The variables that have a positive correlation with volume are hightemp, avgtemp, lowtemp, and summer.
The season that seems to be the most popular for trail users is the summer with an average temperature. You can tell this because between summer and fall the summer has positive correlations while fall has all negative correlations.
Hint: Use message, echo and results in the chunk options. Refer to the RMarkdown Reference Guide.