Editing Statistics and Statistical Programming (Fall 2020)/pset8
From CommunityData
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 1: | Line 1: | ||
== Part I: | == Part I: | ||
== Part II: Analyze and interpret a simulated study of education and income == | == Part II: Analyze and interpret a simulated study of education and income == | ||
The | The first set of programming challenges this week pose an open-ended set of questions about a simulated dataset from an observational study of high school graduates' academic achievement and subsequent income. Here is some information about the "study design" ('''note: this is not data from an actual study'''): | ||
:: | :: Data from twelve cohorts of public high school students was collected from across the Chicago suburbs. Each cohort incorporates a random sample of 142 students from a single suburban school district. For each student, researchers gathered a standardized measure of the students' aggregate GPA as a proxy for their academic achievement. The researchers then matched the students' names against IRS records five years later and collected each student's reported pre-tax earnings for that year. | ||
I have provided you with a version of the dataset from this hypothetical study in which each row corresponds to one student. For each student, the dataset contains the following variables: | I have provided you with a version of the dataset from this hypothetical study in which each row corresponds to one student. For each student, the dataset contains the following variables: | ||
Line 21: | Line 14: | ||
For the rest of this programming challenge, you should use this dataset to answer the following research questions: | For the rest of this programming challenge, you should use this dataset to answer the following research questions: | ||
* How does high school academic achievement relate to earnings? | * How does high school academic achievement relate to earnings? | ||
* | * Does this relationship vary by school district? | ||
You may use any analytical procedures you deem appropriate given the study design | You may use any analytical procedures you deem appropriate given the structure of the dataset and study design. Some things you may want to keep in mind: | ||
* | * ANOVAs, T-tests, and linear regression might help you test different kinds of hypotheses. | ||
* Adjusting for multiple comparisons is important. | |||
== Part | == Part II: Trick-or-treating all over again == | ||
The | The second set of programming challenges this week revisit the trick-or-treating experiment [[Statistics_and_Statistical_Programming_(Fall_2020)/pset5|we analyzed a few weeks ago]]. | ||
Load up the dataset. For this exercise we're going to fit a few versions of the following model. | Load up the dataset. For this exercise we're going to fit a few versions of the following model. | ||
Line 37: | Line 31: | ||
=== Fit a model to test for treatment effects === | === 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: | 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). | * The outcome is dichotomous, so you can/should use logistic regression to model this data (we can discuss this choice in class). For the sake of simplicity (and because it's not covered in the textbook), we're going to side-step any questions about the assumptions necessary to identify a logistic model as well as specific steps you might take to evaluate the model fit (but rest assured that both exist!). | ||
* 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 | * 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 using 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 [https://communitydata.science/~ | * 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 [https://communitydata.science/~mako/2017-COM521/logistic_regression_interpretation.html Mako Hill's R tutorial on interpreting the results of logistic regression]]'') | ||
* For the model-predicted probabilities, please estimate the treatment effects for the following hypothetical individuals: | * For the model-predicted probabilities, please estimate the treatment effects for the following hypothetical individuals: | ||
** a 9-year old girl in 2015. | ** a 9-year old girl in 2015. |