library(haven)library(ggplot2) #Graphical display of resultslibrary(ggeffects) #Calculates predicted values and probabilities from regression models
Warning: package 'ggeffects' was built under R version 4.4.3
library(tidyverse) #General coding language
── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr 1.1.4 ✔ readr 2.1.5
✔ forcats 1.0.0 ✔ stringr 1.5.1
✔ lubridate 1.9.3 ✔ tibble 3.2.1
✔ purrr 1.0.2 ✔ tidyr 1.3.1
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag() masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(stargazer) #Display regression tables
Please cite as:
Hlavac, Marek (2022). stargazer: Well-Formatted Regression and Summary Statistics Tables.
R package version 5.2.3. https://CRAN.R-project.org/package=stargazer
library(caret) #Confusion matrix
Warning: package 'caret' was built under R version 4.4.3
Loading required package: lattice
Attaching package: 'caret'
The following object is masked from 'package:purrr':
lift
library(jtools) #Display regression tables & does other calculations on our regression output
Warning: package 'jtools' was built under R version 4.4.3
library(janitor) #Cleans variable names in our dataset
Attaching package: 'janitor'
The following objects are masked from 'package:stats':
chisq.test, fisher.test
library(descr) #Efficient approach to calculating frequency tables for individual variables
Warning: package 'descr' was built under R version 4.4.3
Attaching package: 'descr'
The following object is masked from 'package:janitor':
crosstab
library (skimr) #Efficient approach to looking at means, variance and distribution for a set of datalibrary(patchwork) #Merge GGPlots together library(stats) #Imports survey datalibrary(nnet) #For multinomial modelslibrary(MASS) #For ordered models
Attaching package: 'MASS'
The following object is masked from 'package:patchwork':
area
The following object is masked from 'package:dplyr':
select
Model Building:define hypothesis & control variables
The hypothesis for all three primary independent variables would be: - The level of respondents’ identity with a political party will lead to an increase in the chance they reported voting. - The degree of respondents’ educational attainment will lead to an increase in the chance they reported voting. - The level of respondents’ interest in politics will lead to an increase in the chance they reported voting.
The control variables:
I chose two variables, person of color or not and biological Sex, as control variables because they are dichotomous demographic variables.
logit <-glm(report_vote ~factor(political_party)+factor(education)+factor(interested_in_politics)+female+person_of_color_or_not, data =anes_vv, family =binomial(link ="logit"))summary(logit)
Call:
glm(formula = report_vote ~ factor(political_party) + factor(education) +
factor(interested_in_politics) + female + person_of_color_or_not,
family = binomial(link = "logit"), data = anes_vv)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -2.7305 0.5059 -5.397 6.77e-08 ***
factor(political_party)1 0.6319 0.3138 2.014 0.04399 *
factor(political_party)2 0.4025 0.3067 1.312 0.18936
factor(political_party)3 1.3377 0.2908 4.600 4.22e-06 ***
factor(education)2 0.3130 0.2437 1.284 0.19900
factor(education)3 0.7880 0.3079 2.560 0.01048 *
factor(education)4 0.6715 0.3220 2.086 0.03701 *
factor(interested_in_politics)2 1.4301 0.3832 3.732 0.00019 ***
factor(interested_in_politics)3 1.7580 0.3626 4.849 1.24e-06 ***
factor(interested_in_politics)4 2.3531 0.4340 5.421 5.91e-08 ***
female 0.1245 0.1989 0.626 0.53158
person_of_color_or_not -0.1945 0.2038 -0.954 0.33985
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 711.07 on 512 degrees of freedom
Residual deviance: 603.62 on 501 degrees of freedom
(70 observations deleted due to missingness)
AIC: 627.62
Number of Fisher Scoring iterations: 4
probit <-glm(report_vote ~factor(political_party)+factor(education)+factor(interested_in_politics)+female+person_of_color_or_not, data =anes_vv, family =binomial(link ="probit"))summary(probit)
Call:
glm(formula = report_vote ~ factor(political_party) + factor(education) +
factor(interested_in_politics) + female + person_of_color_or_not,
family = binomial(link = "probit"), data = anes_vv)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -1.59966 0.28794 -5.555 2.77e-08 ***
factor(political_party)1 0.37234 0.18911 1.969 0.04897 *
factor(political_party)2 0.21992 0.18338 1.199 0.23044
factor(political_party)3 0.79491 0.17336 4.585 4.53e-06 ***
factor(education)2 0.19404 0.14672 1.323 0.18599
factor(education)3 0.47964 0.18498 2.593 0.00952 **
factor(education)4 0.41647 0.19392 2.148 0.03175 *
factor(interested_in_politics)2 0.81854 0.21494 3.808 0.00014 ***
factor(interested_in_politics)3 1.02532 0.20175 5.082 3.73e-07 ***
factor(interested_in_politics)4 1.38358 0.24578 5.629 1.81e-08 ***
female 0.07464 0.11972 0.624 0.53295
person_of_color_or_not -0.12250 0.12266 -0.999 0.31794
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 711.07 on 512 degrees of freedom
Residual deviance: 604.16 on 501 degrees of freedom
(70 observations deleted due to missingness)
AIC: 628.16
Number of Fisher Scoring iterations: 4
ols <-glm(report_vote ~factor(political_party)+factor(education)+factor(interested_in_politics)+female+person_of_color_or_not, data =anes_vv, family =gaussian(link ="identity"))summary(ols)
Call:
glm(formula = report_vote ~ factor(political_party) + factor(education) +
factor(interested_in_politics) + female + person_of_color_or_not,
family = gaussian(link = "identity"), data = anes_vv)
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -0.03067 0.08969 -0.342 0.732516
factor(political_party)1 0.13194 0.06442 2.048 0.041075 *
factor(political_party)2 0.07586 0.06130 1.238 0.216455
factor(political_party)3 0.28194 0.05836 4.831 1.81e-06 ***
factor(education)2 0.06553 0.04974 1.317 0.188284
factor(education)3 0.16680 0.06292 2.651 0.008279 **
factor(education)4 0.14220 0.06614 2.150 0.032052 *
factor(interested_in_politics)2 0.25207 0.06650 3.790 0.000169 ***
factor(interested_in_politics)3 0.33251 0.06184 5.377 1.17e-07 ***
factor(interested_in_politics)4 0.45696 0.07751 5.895 6.88e-09 ***
female 0.02697 0.04061 0.664 0.506914
person_of_color_or_not -0.04260 0.04163 -1.023 0.306654
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for gaussian family taken to be 0.207255)
Null deviance: 128.23 on 512 degrees of freedom
Residual deviance: 103.83 on 501 degrees of freedom
(70 observations deleted due to missingness)
AIC: 662.33
Number of Fisher Scoring iterations: 2
Display and interpret the results
export_summs(ols, logit, probit, type="text", digits=3,model.names =c("Normal: Respondent reported they voted or not", "Logit: Respondent reported they voted or not", "Probit: Respondent reported they voted or not"), coefs=c("Intercept"="(Intercept)", "party_str:Leaning Partisan"="factor(political_party)1", "party_str:Weak Partisan"="factor(political_party)2", "party_str: Strong Partisan"="factor(political_party)3", "educ:Some College"="factor(education)2", "educ: Bachelor’s"="factor(education)3", "educ:Advanced"="factor(education)4", "pol_int:Not very interested"="factor(interested_in_politics)2", "pol_int:Somewhat interested"="factor(interested_in_politics)3", "pol_int:Very interested"="factor(interested_in_politics)4", "Female"="female", "Person of color or not"="person_of_color_or_not") , quiet =TRUE)
graphic_function <-function (z) {ggplot(z, aes(x = x)) +geom_line(aes(y = predicted, color = group), linewidth = .75) +geom_ribbon(aes(ymin = conf.low, ymax = conf.high), alpha =0.05) +labs(y ="Predicted Value of Y") +# Update y-axis label heretheme_minimal()}graphic_pp_1<-graphic_function(pp_1)+labs (x="An individual's identification with a political party", color="An individual's \n identification with \n a political party" ,title ="Predicted Probability with Confidence Intervals", subtitle ="Factors set to Female and Person of color or not")+scale_x_continuous(labels=c("0"="Independent", "1"="Leaning Partisan", "2"="Weak Partisan", "3"="Strong Partisan"))+scale_color_manual(values =c("1"="darkred") ,labels =c("1"="party_str"))graphic_pp_1
graphic_pp_2 <-graphic_function(pp_2)+labs (x="Educational Attainment For The Responden", color="Education" ,title ="Predicted Probability with Confidence Intervals", subtitle ="Factors set to Female and Person of color or not")+scale_x_continuous(labels=c("1"="HS or less", "2"="Some College", "3"="Bachelor’s", "4"="Advanced"))+scale_color_manual(values =c("1"="darkgreen") ,labels =c("1"="education"))graphic_pp_2
graphic_pp_3 <-graphic_function(pp_3)+labs (x="Respondent's politics interested in politics", color="Respondent's politics \n interested in politics" ,title ="Predicted Probability with Confidence Intervals", subtitle ="Factors set to Female and Person of color or not")+scale_x_continuous(labels=c("1"="Not al all interested", "2"="Not very interested", "3"="Somewhat interested", "4"="Very interested"))+scale_color_manual(values =c("1"="orange") ,labels =c("1"="pol_int"))graphic_pp_3
The Logit model has lower AIC and BIC numbers compared to linear and probit models. Regarding the Pseudo R-squared, the Logit model has higher numbers compared to the linear and probit model. Accordingly, the Logit model will be a better fit with the dataset.
Interpretation: In the logit model, the coefficient values indicate the logged odds. Below, we show the factors significantly related to whether respondents reported voting in the survey.
Compared to “Independent” and holding other variables constant, the “Leaning Partisan” factor in variables that measure how closely a person identifies with a political party, at its steepest slope, increase one unit is equal to a 0.632 logged odds increase in the variable analysis if respondents reported they voted or not. This outcome means that people with leaning partisan identification are more likely to lie about voting than those independent identification.
Compared to “Independent” and holding other variables constant, the “Strong Partisan” factor in variables that measure how closely a person identifies with a political party”, at its steepest slope, an increase of one unit is equal to a 1.338 logged odds increase in the variable analysis if respondents reported they voted or not. This outcome means that people with strong partisan identification are more likely to lie about voting than those independent identification.
Compared to “HS or less” and holding other variables constant, the “Bachelor’s” factor in variables that measure educational attainment for the respondent, at its steepest slope, an increase of one unit is equal to a 0.788 logged odds increase in the variable analysis if respondents reported they voted or not. This outcome means people with Bachelor’s degrees are more likely to lie about voting than those with “HS or less.”
Compared to “HS or less” and holding other variables constant, the “Advanced” factor in variables that measure educational attainment for the respondent, at its steepest slope, increase one unit is equal to a 0.672 logged odds increase in the variable analysis if respondents reported they voted or not. This outcome means those with an “Advanced” education degree (Master’s or higher) are more likely to lie about voting than those with “HS or less.”
Compared to “Not at all interested” and holding other variables constant, the “Not very interested” factor in variables that measure how interested in politics a respondent is, at its steepest slope, increase one unit is equal to a 1.430 logged odds increase in the variable analysis if respondents reported they voted or not. This outcome means that people who are not very interested in politics are more likely to lie about voting than those who are “Not at all interested.”
Compared to “Not at all interested” and holding other variables constant, the “Somewhat interested” factor in variables that measure how interested in politics a respondent is, at its steepest slope, increase one unit is equal to a 1.758 logged odds increase in the variable analysis if respondents reported they voted or not. This outcome means the people who are somewhat interested in politics are more likely to lie about voting than those who are“Not at all interested.”
Compared to “Not at all interested” and holding other variables constant, the “Very interested” factor in variables that measure how interested in politics a respondent is, at its steepest slope, increase one unit is equal to a 2.353 logged odds increase in the variable analysis if respondents reported they voted or not. This outcome means the people who are very interested in politics are more likely to lie about voting than those who are “Not at all interested.”
A brief description of why:
Thus, certain factors in variables measure how closely a person identifies with a political party and the educational attainment of the respondent, and all factors in variables measure respondents’ interest in politics are statistically significantly related to misrepresenting voting.
For the variable related to a political party and interest in politics, people who have strong ideological beliefs are more active and prefer to speak out and participate in every level of the political process. The people at the middle of the range are likely to stay distant and disengaged about politics. For people who are earning college degrees or higher are more likely to vote because the university creates a great environment provoking registration to vote. For instance, at Umass, there are many activities being held and propaganda messages being sent out to encourage students to vote and provide guidelines and support. Thus, to fit the trend, some people who might not vote will say they vote.
Model Building:define hypothesis & control variables
The hypothesis for all three primary independent variables would be: 1) The level of conservative partisan identification will be positive relative to the respondent’s position against gay marriage. People are more likely to be against gay marriage when leaner to Republicans. 2) The importance of religion in the respondent’s life will have a positive relationship with the respondent’s position against gay marriage. The more religion is important for people, the more likely they are against gay marriage. 3)The strength of ideological identification will have a positive relationship with the level of respondent’s position against gay marriage. The more conserved people are, the more likely they are against gay marriage.
The control variables:
I chose two variables, person of color or not and biological Sex, as control variables because they are dichotomous demographic variables.
export_summs(ols_order, logistic_order, probit_order, digits=3, model.names =c("Normal: Respondent’s position on gay marriage", "Logit: Respondent’s position on gay marriage", "Probit: Respondent’s position on gay marriage"), coefs=c("Intercept"="(Intercept)", "pid_x: weak democrat"="partisan_identification2", "pid_x:lean democrat"="partisan_identification3", "pid_x: independent"="partisan_identification4", "pid_x: lean republican"="partisan_identification5", "pid_x: weak republican"="partisan_identification6", "pid_x:strong republican"="partisan_identification7", "religion:Very important"="importance_of_religion2", "religion:Moderately important"="importance_of_religion3", "libcon: somewhat liberal"="strength_of_ideological_identification2", "libcon:slightly liberal"="strength_of_ideological_identification3", "libcon:moderate"="strength_of_ideological_identification4", "libcon: slightly conservative"="strength_of_ideological_identification5", "libcon:somewhat conservative"="strength_of_ideological_identification6", "libcon:extremely conservative"="strength_of_ideological_identification7", "Female"="female", "Person of color"="person_of_color_or_not") , quiet =TRUE)
Re-fitting to get Hessian
Re-fitting to get Hessian
Warning in FUN(X[[i]], ...): tidy() does not return p values for models of
class data.frame; significance stars not printed.
Warning in FUN(X[[i]], ...): tidy() does not return p values for models of
class data.frame; significance stars not printed.
logistic_graphic<-function (z) {z %>%ggplot(aes(x = response.level, y = predicted, fill =factor(x))) +geom_bar(stat ="identity", position ="dodge", width =0.7) +geom_errorbar(aes(ymin = conf.low, ymax = conf.high), width =0.4, position =position_dodge(width =0.7))+labs(x =" Response Level: Respondent’s Position On Gay Marriage", y ="Predicted Probability", title ="Predicted Probability with Confidence Intervals")+theme_minimal(base_size =13)+scale_x_discrete(labels =c("1"="Gays and lesbians \n should be allowed \n to legally marry", "2"="Gays and lesbians \n should be allowed \n to form civil \n unions but not \n legally marry", "3"="There should be \n no legal recognition \n of gay or \n lesbian couples’ relationship"))+theme(legend.position ="bottom")}logistic_predict_1_graphic<-logistic_graphic (logistic_predict_1)+scale_fill_manual(values =c("1"="blue", "2"="cornflowerblue", "3"="lightblue", "4"="darkgrey","5"="lightcoral", "6"="red", "7"="firebrick"), labels=c("1"="strong democrat", "2"="weak democrat", "3"="lean democrat", "4"="independent", "5"="lean republican", "6"="weak republican", "7"="strong republican"))+# Custom x-axis labelsguides(fill =guide_legend(title ="Partisan \n Identification", nrow=3), color ="none")logistic_predict_1_graphic
logistic_predict_2_graphic <-logistic_graphic (logistic_predict_2)+scale_fill_discrete(labels=c("1"="Extremely important", "2"="Very important", "3"="Moderately important"))+# Custom x-axis labelsguides(fill =guide_legend(title ="Importance Of Religion \n In Respondent’s Life", nrow=2), color ="none")logistic_predict_2_graphic
Regarding the AIC and BIC, the logit model has lower numbers than the linear and probit models. Accordingly, the Logit model will be a better fit with the dataset.
Compared to “strong Democrat” and holding other variables constant, the “weak Democrat” factor in variables that measure partisan identification, at its steepest slope, increases one unit equal to a 0.844 logged odds increase in the variable analysis respondent’s position on gay marriage. This outcome means that people with weak Democratic identification are more likely to oppose gay marriage than those with strong Democratic identification.
Compared to “strong democrat” and holding other variables constant, the “strong republican” factor in variables that measure partisan identification, at its steepest slope, increases one unit equal to a 0.844 logged odds increase in the variable analysis respondent’s position on gay marriage. This outcome means that people with strong republican identification are more likely to be against gay marriage than those with strong democrat identification.
Compared to “Not important at all” and holding other variables constant, the “Moderately important” factor in variables that measure the importance of religion in respondent’s life, at its steepest slope, increase one unit increase is equal to a 0.942 logged odds increase in the variable analysis respondent’s position on gay marriage. This outcome means that people with strong republican identification are more likely to be against gay marriage than those with strong democrat identification. This outcome means that people who feel religion is moderately important are more likely to be against gay marriage than those who feel not important at all.
Compared to “extremely liberal” and holding other variables constant, the “slightly liberal” factor in variables that measure the strength of ideological identification, at its steepest slope, increases one unit equal to a 1.546 logged odds increase in the variable analysis respondent’s position on gay marriage. This outcome means that people who are extremely liberal are more likely to be against gay marriage than those who are extremely liberal.
Compared to “extremely liberal” and holding other variables constant, the “moderate” factor in variables that measure the strength of ideological identification, at its steepest slope, increase one unit is equal to a 1.642 logged odds increase in the variable analysis respondent’s position on gay marriage. This outcome means that people who moderate are more likely to be against gay marriage than those who are extremely liberal.
Compared to “extremely liberal” and holding other variables constant, the “slightly conservative” factor in variables that measure the strength of ideological identification, at its steepest slope, increases one unit equal to a 1.882 logged odds increase in the variable analysis respondent’s position on gay marriage. This outcome means that slightly conservative people are more likely to be against gay marriage than those who are extremely liberal.
Compared to “extremely liberal” and holding other variables constant, the “somewhat conservative” factor in variables that measure the strength of ideological identification, at its steepest slope, increases one unit equal to a 2.212 logged odds increase in the variable analysis respondent’s position on gay marriage. This outcome means that somewhat conservative people are more likely to be against gay marriage than those who are extremely liberal.
Compared to “extremely liberal” and holding other variables constant, the “extremely conservative” factor in variables that measure the strength of ideological identification, at its steepest slope, increases one unit equal to a 2.955 logged odds increase in the variable analysis respondent’s position on gay marriage. This outcome means that extremely conservative people are more likely to be against gay marriage than those who are extremely liberal.
For the female variable, at its steepest slope, increases of one unit equal to a 0.397 logged odds decrease in the variable analysis respondent’s position on gay marriage. This outcome means that females are less likely to be against gay marriage than men.
For the Person of color variable, at its steepest slope, an increase of one unit increase in the level of the strength of ideological identification is equal to a 0.924 logged odds increase in the variable analysis respondent’s position on gay marriage. This outcome means that people of color are less likely to be against gay marriage than people of no color.
Test the parallel regression assumption using the Brant test
Warning in brant(logistic_order): 231 combinations in table(dv,ivs) do not
occur. Because of that, the test results might be invalid.
According to the Omnibus, the probability is 0.08, which means the model is not significant and the parallel regression assumption is met. However, variables like “weak democrat” and “lean republican” are violated as they are smaller than 0.05. There is no need to move to the multinomial modeling approach as it overall does not violate the parallel regression assumption.
# weights: 54 (34 variable)
initial value 1612.762840
iter 10 value 683.150944
iter 20 value 661.133818
iter 30 value 659.446547
iter 40 value 659.085847
iter 50 value 659.011590
final value 659.011351
converged
# weights: 54 (34 variable)
initial value 1612.762840
iter 10 value 683.150944
iter 20 value 661.133818
iter 30 value 659.446547
iter 40 value 659.085847
iter 50 value 659.011590
final value 659.011351
converged
# weights: 54 (34 variable)
initial value 1612.762840
iter 10 value 683.150944
iter 20 value 661.133818
iter 30 value 659.446547
iter 40 value 659.085847
iter 50 value 659.011590
final value 659.011351
converged
# Function to fit the model and get predictionsboot_fn <-function(data, indices) { boot_sample <- data[indices, ] # Resample data model_boot <-multinom(position_on_gay_marriage~ partisan_identification + importance_of_religion + strength_of_ideological_identification +female + person_of_color_or_not, data = boot_sample, trace =FALSE) preds <-ggpredict(model_boot, terms ="partisan_identification") # Get predictions for pid_freturn(preds$predicted)}set.seed(2006) #Uses same random number generator for sampling purpossboot_results <-boot(data = anes_marriage, statistic = boot_fn, R =500) #R = is where you control number of bootstrapped samples. Should be at least 500 ideally 1,000# Compute 95% confidence intervalsconf.low <-apply(boot_results$t, 2, quantile, probs =0.025)conf.high <-apply(boot_results$t, 2, quantile, probs =0.975)# Get original ggeffects predictionsmultinomial_model <-ggpredict(multinom_model, terms="partisan_identification")# Add CIs to ggeffects outputmultinomial_model$lower <- conf.lowmultinomial_model$upper <- conf.highmulti <-ggplot(multinomial_model, aes(x = x, y = predicted, color = response.level)) +geom_point(stat ="identity", position =position_dodge(width =0.5)) +theme_minimal(base_size =13)+labs(x ="Partisan Identification", y ="Predicted Probability", title ="Predicted Probability Multinomial")+scale_color_discrete(labels =c("1"="Gays and lesbians should \n be allowed to legally marry", "2"="Gays and lesbians should be \n allowed to legally marry", "3"="There should be no legal recognition \n of gay or lesbian couples’ relationship") ) +# Default color scale with custom labelsscale_x_discrete(labels =c("1"="Strong Democrat", "2"="Weak Democrat", "3"="Lean Democrat", "4"="Independent","5"="Lean Republican", "6"="Weak Republican", "7"="Strong Republican")) +theme(legend.position =c(0.05, 0.95), legend.justification =c(0, 1)) +# Position the legendguides(color =guide_legend(title ="Respondent’s Position On Gay Marriage")) +geom_errorbar(aes(ymin = conf.low, ymax = conf.high), width =0.4, position =position_dodge(width =0.5))+theme(axis.text.x =element_text(angle=15))
Warning: A numeric `legend.position` argument in `theme()` was deprecated in ggplot2
3.5.0.
ℹ Please use the `legend.position.inside` argument of `theme()` instead.
multi
order <-ggplot(ordered_model, aes(x = x, y = predicted, color = response.level)) +geom_point(stat ="identity", position =position_dodge(width =0.5)) +theme_minimal(base_size =13)+labs(x ="Partisan Identification", y ="Predicted Probability", title ="Predicted Probability Multinomial")+scale_color_discrete(labels =c("1"="Gays and lesbians should \n be allowed to legally marry", "2"="Gays and lesbians should \n be allowed to legally marry", "3"="There should be no legal recognition \n of gay or lesbian couples’ relationship") ) +# Default color scale with custom labelsscale_x_discrete(labels =c("1"="Strong Democrat", "2"="Weak Democrat", "3"="Lean Democrat", "4"="Independent","5"="Lean Republican", "6"="Weak Republican", "7"="Strong Republican")) +theme(legend.position =c(0.05, 0.95), legend.justification =c(0, 1)) +# Position the legendguides(color =guide_legend(title ="Respondent’s Position On Gay Marriage")) +geom_errorbar(aes(ymin = conf.low, ymax = conf.high), width =0.4, position =position_dodge(width =0.5))+theme(axis.text.x =element_text(angle=15)) order
plots<-multi + order plots
Overall, for respondent’s positions on gay marriage are “Gays and lesbians should be allowed to form civil unions but not legally marry” and “There should be no legal recognition of gay or lesbian couples’ relationship” partisan identification, especially lean to Republican, lean to the conservative, feel religion are important, male, and people of not color are more likely in this position.
Keeping all other variables constant, if “Weak Democrat” is higher by one unit, the log odds for “Gays and lesbians should be allowed to form civil unions but not legally marry” is higher by 0.655.
Keeping all other variables constant, if “Lean Republican” is higher by one unit, the log odds for “Gays and lesbians should be allowed to form civil unions but not legally marry” is higher by 1.051.
Keeping all other variables constant, if “weak republican” is higher by one unit, the log odds for “Gays and lesbians should be allowed to form civil unions but not legally marry” is higher by 0.851.
Keeping all other variables constant, if “strong republican” is higher by one unit, the log odds for “Gays and lesbians should be allowed to form civil unions but not legally marry” is higher by 1.031.
Keeping all other variables constant, if “Very important” is higher by one unit, the log odds for “Gays and lesbians should be allowed to form civil unions but not legally marry” is higher by 0.687.
Keeping all other variables constant, if “Moderately important” is higher by one unit, the log odds for “Gays and lesbians should be allowed to form civil unions but not legally marry” is higher by 1.142.
Keeping all other variables constant, if “slightly conservative” is higher by one unit, the log odds for “Gays and lesbians should be allowed to form civil unions but not legally marry” is higher by 1.449.
Keeping all other variables constant, if “somewhat conservative” is higher by one unit, the log odds for “Gays and lesbians should be allowed to form civil unions but not legally marry” is higher by 1.671.
Keeping all other variables constant, if “extremely conservative” is higher by one unit, the log odds for “Gays and lesbians should be allowed to form civil unions but not legally marry” is higher by 1.708.
Keeping all other variables constant, if “Female” is higher by one unit, the log odds for “Gays and lesbians should be allowed to form civil unions but not legally marry” is decreased by 0.411.
Keeping all other variables constant, if “Person of color” is higher by one unit, the log odds for “Gays and lesbians should be allowed to form civil unions but not legally marry” is decreased by 0.696.
Keeping all other variables constant, if “weak republican” is higher by one unit, the log odds for “There should be no legal recognition of gay or lesbian couples’ relationship” is decreased by 0.909.
Keeping all other variables constant, if “Moderately important” is higher by one unit, the log odds for “There should be no legal recognition of gay or lesbian couples’ relationship” is decreased by 0.595.
Keeping all other variables constant, if “somewhat liberal” is higher by one unit, the log odds for “There should be no legal recognition of gay or lesbian couples’ relationship” is decreased by 11.780.
Keeping all other variables constant, if “slightly liberal” is higher by one unit, the log odds for “There should be no legal recognition of gay or lesbian couples’ relationship” is decreased by 13.689.
Keeping all other variables constant, if “somewhat conservative” is higher by one unit, the log odds for “There should be no legal recognition of gay or lesbian couples’ relationship” is decreased by 14.270.
Keeping all other variables constant, if “extremely conservative” is higher by one unit, the log odds for “There should be no legal recognition of gay or lesbian couples’ relationship” is decreased by 15.786.
Keeping all other variables constant, if “Person of color” is higher by one unit, the log odds for “There should be no legal recognition of gay or lesbian couples’ relationship” is decreased by 1.397.
According to the graphic, the multinomial regression looks similar to the ordered model, so there is no violation of the proportional regressions assumption.