Not logged in
Talk
Contributions
Create account
Log in
Navigation
Main page
About
People
Publications
Teaching
Resources
Research Blog
Wiki Functions
Recent changes
Help
Licensing
Page
Discussion
Edit
View history
Editing
Statistics and Statistical Programming (Winter 2021)/Problem set 16
(section)
From CommunityData
Jump to:
navigation
,
search
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.
Anti-spam check. Do
not
fill this in!
=== Trick-or-treating all over again === The final questions revisit the trick-or-treating experiment we analyzed a few weeks ago ([[../Problem set 11]]). Load up the dataset. For this exercise we're going to fit a few versions of the following model. :: <math>\widehat{\mathrm{fruit}} = \beta_0 + \beta_1 \mathrm{obama} + \beta_2 \mathrm{age} + \beta_3 \mathrm{male} + \beta_4 \mathrm{year} + \varepsilon</math> You may want to revisit your earlier analysis and exploration of the data as you prepare to conduct the following analyses. You may also want to generate new exploratory analysis and summary statistics that incorporate the <code>age</code>, <code>male</code>, and <code>year</code> variables that we did not consider in our analysis last time around. ==== PC3: Fit a model to test for treatment effects ==== Now, let's construct a test for treatment effects. For a between-groups randomized-controlled trial (RCT) like this, that means we'll focus on the fitted parameter for the treatment assignment variable (<math>\beta_1\mathrm{obama}</math>) which will provide a direct estimate of the causal effect of exposure to the treatment (compared against the control) condition. That said, here are a few tips, notes, and requests: * 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. * 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'') * For the model-predicted probabilities, please estimate the treatment effects for the following hypothetical individuals: ** a 9-year old girl in 2015. ** a 7-year old boy in 2012. ==== PC4 Conduct a post-hoc "sub-group" analysis ==== The paper mentions that the methods of random assignment and the experimental conditions were a little different for each year in which the study was run. Fit models (without the parameter for <math>\mathrm{year}</math>) on the corresponding subsets of the data (2012, 2014, 2015). ==== PC4 Interpret and discuss your results ==== Explain what you found! Be sure to find useful and meaningful ways to convey your findings in terms of the odds-ratios and model-predicted probabilities. Make sure to address any discrepancies you observe between your original (i.e., Problem Set 5) t-test estimates, the "full" logistic model results you estimated and the sub-group analysis you conducted above.
Summary:
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)
Tools
What links here
Related changes
Special pages
Page information