DAT Assignment 1: ANOVA

(For those following along, this is the second course I’m taking to learn SAS. It’s designed to be taken after the first course, but as I’m already familiar with the statistical concepts in both courses, I’m taking them concurrently. That does mean, however, that the order of posts will be somewhat jumpy as I’ll be posting assignments for ANOVA before completing the full set of descriptive analysis required for the first course.)

Create a blog entry where you submit syntax used to run an ANOVA (copied and pasted from your program) along with corresponding output and a few sentences of interpretation.
My responses after the cut.

In keeping with my original project hypothesis, I was interested in testing the mean difference in reported level of trust for the police in the Outlook on Life (OOL) survey between Non-Hispanic Whites and Non-Hispanic Blacks. The question in OOL is presented as part of a group question asking respondents to indicate how much they think they can trust each institution. The response options are a Likert scale with every point labeled as follows:
  • 1 = Just about always
  • 2 = Most of the time
  • 3 = Only some of the time
  • 4 = Never

Refused responses were coded as -1 and represent 2.8% of the responses. I filtered the data so that only responses from the two race groups I’m interested in were included and removed the refused responses so they wouldn’t incorrectly dampen the Likert scale means. Relevant code to run this is shown below:

LIBNAME mydata “/courses/d1406ae5ba27fe300″ access=readonly;
/* mydata is the local name for the database */
/* Research question: Race and perception of law enforcement and opportunity for achievement between Blacks and Whites during the beginning of the #BlackLivesMatter movement SPECIFICALLY
H1: Are non-Hispanic Blacks less likely to trust the federal government, the police, and/or the legal system than non-Hispanic Whites?
H1a: Are non-Hispanic Blacks less likely to trust the federal government than non-Hispanic Whites?
H1b: Are non-Hispanic Blacks less likely to trust the police than non-Hispanic Whites?
H1a: Are non-Hispanic Blacks less likely to trust the legal system than non-Hispanic Whites?
SPECIFICALLY H2: Does income-level influence levels of trust in the federal government, the police, and/or the legal system in both Blacks and White?
*/

DATA new; set mydata.oll_pds;
LABEL ppethm=”Race / Ethnicity”
w1_k1_b=”[The police] How much do you think you can trust the following institutions?”

IF ppethm=1 or ppethm = 2;
IF w1_k1_b ~= -1;
/* Select statements limit the cases included in the analysis; includes only those who indicated race/ethnicity of “White, Non-Hispanic” or “Black, Non-Hispanic” */
/* Remove cases where respondents refused the question I’m interested in (coded as -1) */

PROC SORT; by CASEID;
PROC ANOVA; Class PPETHM;
MODEL w1_k1_b=ppethm;
MEANS PPETHM;
RUN;

As I am only comparing mean results for two groups, it is not necessary to run any post-hoc tests on my ANOVA results. Results for the ANOVA are shown below:

The ANOVA Procedure

Class Level Information
Class Levels Values
PPETHM 2 1 2
Number of Observations Read 2032
Number of Observations Used 2032

The ANOVA Procedure

Dependent Variable: W1_K1_B [The police] How much do you think you can trust the following institutions?

Source DF Sum of Squares Mean Square F Value Pr > F
Model 1 97.080204 97.080204 178.04 <.0001
Error 2030 1106.902079 0.545272
Corrected Total 2031 1203.982283
R-Square Coeff Var Root MSE W1_K1_B Mean
0.080633 29.50217 0.738425 2.502953
Source DF Anova SS Mean Square F Value Pr > F
PPETHM 1 97.08020431 97.08020431 178.04 <.0001
Level of
PPETHM
N W1_K1_B
Mean Std Dev
1 797 2.23086575 0.72942524
2 1235 2.67854251 0.74417314

 

The F-statistic returned is statistically significant at the p <.0001 level, indicating that there is a statistically significant difference in the mean responses between Non-Hispanic Whites and Non-Hispanic Blacks in the OOL data in terms of their reported level of trust for the police. I can see by looking at the last table that the mean response for Non-Hispanic Whites was 2.23 and the mean response for Non-Hispanic Blacks was 2.68. I know from looking at the response option coding that higher mean values represent less trust in the police, so I can conclude from these results that Non-Hispanic Blacks responding to the OOL survey are less likely to feel they can trust the police than Non-Hispanic Whites.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s