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

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 33: Line 33:
Calculate and report appropriate summary statistics for the outcome (<code>search_conducted</code>) and each of the predictor variables we care about (<code>date</code>, <code>subject_age</code>, <code>subject_race</code>, and <code>subject_sex</code>). Include visual and/or tabular summaries where appropriate. Attempt, when possible, to write efficient/elegant code that avoids unnecessary repetition while also retaining clarity.
Calculate and report appropriate summary statistics for the outcome (<code>search_conducted</code>) and each of the predictor variables we care about (<code>date</code>, <code>subject_age</code>, <code>subject_race</code>, and <code>subject_sex</code>). Include visual and/or tabular summaries where appropriate. Attempt, when possible, to write efficient/elegant code that avoids unnecessary repetition while also retaining clarity.


=== PC4. Summarize conditional relationships between outcome and predictor variables ===
=== PC4. Summarize aggregate relationships between outcome and predictor variables ===


The outcome variable we care about here is a dichotomous indicator for whether each traffic stop resulted in a police search (of either the driver or the vehicle) being conducted. Summarize the relationship between each of the predictor variables (<code>date</code>, <code>subject_age</code>, <code>subject_race</code>, and <code>subject_sex</code>) and the outcome variable (<code>search_conducted</code>). For continuous predictors, be sure to include visual summaries. For categorical predictors, focus on providing cross-tabulations that report conditional summary statistics within groups (for example, compare the numbers of searches conducted across the two categories of <code>subject_sex</code>).
The outcome variable we care about here is a dichotomous indicator for whether each traffic stop resulted in a police search (of either the driver or the vehicle) being conducted. Summarize the relationship between each of the predictor variables (<code>date</code>, <code>subject_age</code>, <code>subject_race</code>, and <code>subject_sex</code>) and the outcome variable (<code>search_conducted</code>). For continuous predictors, be sure to include visual summaries. For categorical predictors, focus on providing cross-tabulations that report conditional summary statistics within groups (for example, compare the numbers of searches conducted across the two categories of <code>subject_sex</code>).
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)