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 largest group of individuals who have Alzheimers are non-smokers who smoke zero cigarettes per day.
The group that has more cases than expected given independence are the individuals who smoke greater than 20 cigarettes per day and have dimentia because that is the group
Even though there are more cases of people with Alzheimers who do not smoke, there was not a high Pearson residual, so there is not enough evidence to conclude a strong relationship between number of cigarettes and having Alzheimers. One way to test this correlation could be through a scatter plot.
RailTrail
.Hint: The RailTrail
data set is from the mosaicData
package.
volume/ hightemp, lowtemp, avgtemp, and summer
Summer, there is the strongest correlation between volume and this season. The weather is the nicest therefore more people would want to use the trail.
Hint: Use message
, echo
and results
in the chunk options. Refer to the RMarkdown Reference Guide.