You are here

Group Exercise: One More Factorial ANOVA

Keep the same DV and select two new categorical IVs and compute the factorial model. Interpret the results, as appropriate. Paste your R code beneath your interpretation.

Comments

> describeBy(V162113,V161310d)

Descriptive statistics by group
group: 0
vars n mean sd median trimmed
X1 1 3446 54.95 86.86 50 48.04
mad min max range skew kurtosis se
X1 35.58 0 999 999 9.27 98.1 1.48
---------------------------------
group: 1
vars n mean sd median trimmed
X1 1 131 74.6 144.55 50 54.82
mad min max range skew kurtosis se
X1 29.65 0 999 999 5.97 35.31 12.63
> describeBy(V162113,V161246)

Descriptive statistics by group
group: 1
vars n mean sd median trimmed
X1 1 743 57.83 108.86 50 46.24
mad min max range skew kurtosis se
X1 29.65 0 999 999 7.79 64.61 3.99
---------------------------------
group: 2
vars n mean sd median trimmed
X1 1 748 57.65 67.21 52 55.04
mad min max range skew kurtosis se
X1 32.62 0 999 999 10.95 151.23 2.46
> describeBy(V162113,list(V161310d,V161246))

Descriptive statistics by group
: 0
: 1
vars n mean sd median trimmed
X1 1 719 56.72 104.83 50 45.97
mad min max range skew kurtosis se
X1 31.13 0 999 999 8.04 69.55 3.91
---------------------------------
: 1
: 1
vars n mean sd median trimmed
X1 1 21 97.14 208.04 50 54.47
mad min max range skew kurtosis se
X1 14.83 0 999 999 3.86 13.82 45.4
---------------------------------
: 0
: 2
vars n mean sd median trimmed
X1 1 700 57.23 69.14 51 54.22
mad min max range skew kurtosis se
X1 31.13 0 999 999 10.76 144.41 2.61
---------------------------------
: 1
: 2
vars n mean sd median trimmed mad
X1 1 36 61.19 27.25 60 62.4 29.65
min max range skew kurtosis se
X1 0 100 100 -0.23 -0.78 4.54
> summary(lm(V162113~V161310d*V161246))

Call:
lm(formula = V162113 ~ V161310d * V161246)

Residuals:
Min 1Q Median 3Q Max
-97.14 -31.85 -6.72 13.28 942.28

Coefficients:
Estimate Std. Error
(Intercept) 56.209 7.588
V161310d 76.882 43.070
V161246 0.511 4.819
V161310d:V161246 -36.459 25.380
t value Pr(>|t|)
(Intercept) 7.407 2.16e-13 ***
V161310d 1.785 0.0745 .
V161246 0.106 0.9156
V161310d:V161246 -1.437 0.1511
---
Signif. codes:
0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’
0.1 ‘ ’ 1

Residual standard error: 90.75 on 1472 degrees of freedom
(2795 observations deleted due to missingness)
Multiple R-squared: 0.002793, Adjusted R-squared: 0.0007603
F-statistic: 1.374 on 3 and 1472 DF, p-value: 0.249

I have no evidence that Asian identity and religious denomination affects favorability toward the Black Lives Matter movement.

There is no reliable evidence to prove Social Class and Party affiliation influence favorability towards BLM

> ANES2016<-read.csv("http://www.shortell.nyc/online/files/anes_timeseries_2016.csv")
> attach(ANES2016)
> library(gmodels)
> library(psych)
> SocClass<-0; SocClass[V162132==1]<-1; SocClass[V162132==2]<-2; SocClass[V162132==3]<-3; SocClass[V162132==4]<-4
> Party<-0; Party[V161155==1]<-1; Party[V161155==2]<-2; Party[V161155==3]<-3
> describeBy(V162113, SocClass)
> describeBy(V162113, Party)
> describeBy(V162113,list(Party, SocClass))
> summary(lm(V162113~Party*SocClass))

There is no evidence that there is a significant difference between social class and party affiliation on belief in Black lives matter.
>partyaff<-0;partyaff[V161155==1]<-1;partyaff[V161155==2]<-2;partyaff[V161155==3]<-3
> describeBy(V161155,partyaff)

> describeBy(V162113,partyaff)

> describeBy(V162113,V161307)

> describeBy(V162113,list(partyaff,V161307))

> summary(lm(V162113~partyaff*V161307))

> describeBy(V162113,V161241)

Descriptive statistics by group
group: 1
vars n mean sd median trimmed mad min max range
X1 1 2340 57.3 106.72 50 46.16 37.06 0 999 999
skew kurtosis se
X1 7.89 66.9 2.21
----------------------------------------------
group: 2
vars n mean sd median trimmed mad min max range
X1 1 1264 55.08 61.62 50 52.8 29.65 0 999 999
skew kurtosis se
X1 11.31 171.23 1.73
> describeBy(V162113,V161309)

Descriptive statistics by group
group: 1
vars n mean sd median trimmed mad min max range
X1 1 371 83.56 155.12 60 61.6 29.65 0 999 999
skew kurtosis se
X1 5.51 29.68 8.05
----------------------------------------------
group: 2
vars n mean sd median trimmed mad min max range
X1 1 3241 53.44 82.86 50 47.03 37.06 0 999 999
skew kurtosis se
X1 9.59 106.79 1.46
> describeBy(V162113,list(V161241,V161309))

Descriptive statistics by group
: 1
: 1
vars n mean sd median trimmed mad min max range
X1 1 251 90.96 177.68 60 60.9 29.65 0 999 999
skew kurtosis se
X1 4.76 21.44 11.22
----------------------------------------------
: 2
: 1
vars n mean sd median trimmed mad min max range
X1 1 120 68.07 90.16 60 62.92 29.65 0 999 999
skew kurtosis se
X1 9.13 91.76 8.23
----------------------------------------------
: 1
: 2
vars n mean sd median trimmed mad min max range
X1 1 2085 53.32 94.01 50 44.46 44.48 0 999 999
skew kurtosis se
X1 8.75 85.31 2.06
----------------------------------------------
: 2
: 2
vars n mean sd median trimmed mad min max range
X1 1 1140 53.67 57.79 50 51.63 30.39 0 999 999
skew kurtosis se
X1 11.45 185.39 1.71
> summary(lm(V162113~V161241*V161309))

Call:
lm(formula = V162113 ~ V161241 * V161309)

Residuals:
Min 1Q Median 3Q Max
-90.96 -38.32 -3.67 16.68 945.68

Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 174.73 29.40 5.944 3.05e-09 ***
V161241 -46.13 20.93 -2.204 0.0276 *
V161309 -60.88 15.30 -3.978 7.09e-05 ***
V161241:V161309 23.24 10.88 2.136 0.0327 *
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 93.02 on 3592 degrees of freedom
(675 observations deleted due to missingness)
Multiple R-squared: 0.01096, Adjusted R-squared: 0.01013
F-statistic: 13.26 on 3 and 3592 DF, p-value: 1.309e-08

People who identify as Latino and religious are substantially significantly more favorable towards BLM than those who aren't latino and aren't religious. Non hispanics whether they are religious or not religios are significantly less favorable to BML than religious hispanics.

> attach(ANES2016)
> class<-0; class[V161307==1]<-1; class[V161307==4]<-2
> pref_forprescand<-""; pref_forprescand[V161034==1]<-1;pref_forprescand[V161034==2]<-2
> \
Error: unexpected input in "\"
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> describeBy(V162113,V161034)

Descriptive statistics by group
group: 1
vars n mean sd median trimmed mad min max range skew kurtosis se
X1 1 59 92.39 172.92 60 63.22 29.65 0 999 999 4.87 22.62 22.51
---------------------------------------------------------------
group: 2
vars n mean sd median trimmed mad min max range skew kurtosis se
X1 1 56 57.62 131.08 50 40.48 29.65 0 999 999 6.59 44.51 17.52
---------------------------------------------------------------
group: 3
vars n mean sd median trimmed mad min max range skew kurtosis se
X1 1 4 25 28.87 25 25 37.06 0 50 50 0 -2.44 14.43
---------------------------------------------------------------
group: 4
vars n mean sd median trimmed mad min max range skew kurtosis se
X1 1 4 26.5 23.07 28 26.5 25.95 0 50 50 -0.08 -2.24 11.54
---------------------------------------------------------------
group: 5
vars n mean sd median trimmed mad min max range skew kurtosis se
X1 1 7 63.29 24.05 50 63.29 14.83 40 100 60 0.43 -1.76 9.09
---------------------------------------------------------------
group: 6
vars n mean sd median trimmed mad min max range skew kurtosis se
X1 1 1 70 NA 70 70 0 70 70 0 NA NA NA
> describeBy(V162113,pref_forprescand)

Descriptive statistics by group
group:
vars n mean sd median trimmed mad min max range skew kurtosis se
X1 1 1 15 NA 15 15 0 15 15 0 NA NA NA
---------------------------------------------------------------
group: 1
vars n mean sd median trimmed mad min max range skew kurtosis se
X1 1 59 92.39 172.92 60 63.22 29.65 0 999 999 4.87 22.62 22.51
---------------------------------------------------------------
group: 2
vars n mean sd median trimmed mad min max range skew kurtosis se
X1 1 56 57.62 131.08 50 40.48 29.65 0 999 999 6.59 44.51 17.52
> describeBy(V162113,class)

Descriptive statistics by group
group: 0
vars n mean sd median trimmed mad min max range skew kurtosis se
X1 1 1 15 NA 15 15 0 15 15 0 NA NA NA
---------------------------------------------------------------
group: 1
vars n mean sd median trimmed mad min max range skew kurtosis se
X1 1 236 56.62 70.23 50 53.49 51.89 0 999 999 10.18 134.48 4.57
---------------------------------------------------------------
group: 2
vars n mean sd median trimmed mad min max range skew kurtosis se
X1 1 98 49.22 32.8 51.5 49.1 42.25 0 100 100 -0.16 -1.25 3.31
> describeBy(V162113,list(pref_forprescand,class))

Descriptive statistics by group
:
: 0
vars n mean sd median trimmed mad min max range skew kurtosis se
X1 1 1 15 NA 15 15 0 15 15 0 NA NA NA
---------------------------------------------------------------
: 1
: 0
NULL
---------------------------------------------------------------
: 2
: 0
NULL
---------------------------------------------------------------
:
: 1
NULL
---------------------------------------------------------------
: 1
: 1
vars n mean sd median trimmed mad min max range skew kurtosis se
X1 1 7 68.71 20.89 85 68.71 1.48 40 86 46 -0.29 -2.08 7.9
---------------------------------------------------------------
: 2
: 1
vars n mean sd median trimmed mad min max range skew kurtosis se
X1 1 4 35 23.8 45 35 7.41 0 50 50 -0.67 -1.75 11.9
---------------------------------------------------------------
:
: 2
NULL
---------------------------------------------------------------
: 1
: 2
vars n mean sd median trimmed mad min max range skew kurtosis se
X1 1 1 50 NA 50 50 0 50 50 0 NA NA NA
---------------------------------------------------------------
: 2
: 2
NULL
> summary(lm(V162113~pref_forprescand*class)
+
+
+ )

Call:
lm(formula = V162113 ~ pref_forprescand * class)

Residuals:
Min 1Q Median 3Q Max
-35.00 -18.71 5.00 16.29 17.29

Coefficients: (2 not defined because of singularities)
Estimate Std. Error t value Pr(>|t|)
(Intercept) 15.00 21.91 0.685 0.5108
pref_forprescand1 72.43 35.13 2.062 0.0693 .
pref_forprescand2 38.71 33.89 1.142 0.2828
class -18.71 23.42 -0.799 0.4448
pref_forprescand1:class NA NA NA NA
pref_forprescand2:class NA NA NA NA
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 21.91 on 9 degrees of freedom
(4258 observations deleted due to missingness)
Multiple R-squared: 0.5089, Adjusted R-squared: 0.3453
F-statistic: 3.109 on 3 and 9 DF, p-value: 0.08137

There is no evidence that the preference for presidential candidate and social class affect favorability towards the black lives matter movement.