Editing Statistics and Statistical Programming (Winter 2021)/Problem set 16

From CommunityData

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 11: Line 11:
You can load the dataset like:
You can load the dataset like:


<pre syntaxhighlight="r">library(openintro)
<pre syntaxhighlight="R">library(openintro)
data(mariokart)</pre>
data(mariokart)</pre>


Line 56: Line 56:


* The outcome is dichotomous, so you can/should use logistic regression to model this data (we can discuss this choice in class). You may want to evaluate whether the conditions necessary to do so are met.
* The outcome is dichotomous, so you can/should use logistic regression to model this data (we can discuss this choice in class). You may want to evaluate whether the conditions necessary to do so are met.
* You may want/need to convert some of these variables to appropriate types/classes in order to fit a logistic model. I also recommend at least turning <code>year</code> into a factor and creating a "centered" version of the <code>age</code> variable. Centering a variable means setting a new baseline by subtracting some amount from every value for a variable (often the mean of the variable) so that the new "centered" variable is 0 at the mean, negative below it, and positive above it. It's can make interpreting regressions much easier. We can discuss this in class too.
* You may want/need to convert some of these variables to appropriate types/classes in order to fit a logistic model. I also recommend at least turning <code>year</code> into a factor and creating a centered version of the <code>age</code> variable (we can discuss this in class too). Β 
* Be sure to state the alternative and null hypotheses related to the experimental treatment under consideration.
* Be sure to state the alternative and null hypotheses related to the experimental treatment under consideration.
* It's a good idea to include the following in the presentation and interpretation of logistic model results: (1) a tabular summary/report of your fitted model including any goodness of fit statistics you can extract from R; (2) a transformation of the coefficient estimating treatment effects into an "odds ratio"; (3) model-predicted probabilities for prototypical study participants. (''please note that examples for all of these are provided in this week's tutorial'')
* It's a good idea to include the following in the presentation and interpretation of logistic model results: (1) a tabular summary/report of your fitted model including any goodness of fit statistics you can extract from R; (2) a transformation of the coefficient estimating treatment effects into an "odds ratio"; (3) model-predicted probabilities for prototypical study participants. (''please note that examples for all of these are provided in this week's tutorial'')
Please note that all contributions to CommunityData are considered to be released under the Attribution-Share Alike 3.0 Unported (see CommunityData:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:

Cancel Editing help (opens in new window)