Intro to Conjoint Experiments | Exercise - 4
1 Environment preparation
# ### Data import ###
# install.packages("readr") # read datasets
# install.packages("qualtRics") # read qualtrics datasets
# ### Data manipulation ###
# install.packages("dplyr") # pipes and data manipulation
# ### Visualization ###
# install.packages("ggplot2") # graphing capabilities
# ### Estimation ###
# install.packages("cjoint") # base amce package
# install.packages("cregg") # amce and mm
# install.packages("factorEx") # amce with non-uniform distribution
## Custom build functions
# library(devtools)
# install_github("albertostefanelli/cjoint") # fixes some problem with cjoint
### Data import ###
library("readr")
library("qualtRics")
### Data manipulation ###
library("dplyr")
### Visualization ###
library("ggplot2")
### Estimation ###
library("cjoint")
library("cregg")
library("factorEx")
2 Data
- From the paper “The Ties that Double Bind” (Teele, Kalla, and Rosenbluth 2018)
- We are going to use the Legislators and Voters sample
- The authors want to test different type of gender biases
- Among Legislators
- Among Voters
Attribute | Values |
---|---|
Gender | Female, Male |
Age | 29, 45, 65 |
Number of Children | 0, 1, 3 |
Highest Elected Political Post | None, Mayor, State Legislator |
Occupation | Corporate Lawyer, Third Grade Teacher |
Spouse’s Occupation | Doctor, Farmer, Unmarried |
- Variables in the dataset
- CJ choice task= “winner”
- Type of sample = “sample”
- Respondent’s gender=“female_respondent”
- Respondent’s PID= “democrat_respondent”, “republican_respondent”
- Candidate’s gender= “orig_cand_female”
- Candidate’s political Experience= “orig_0ys”, “orig_1ys”, “orig_3ys”, “orig_8ys”
- Candidate’s number of Children= “orig_0ch”, “orig_1ch”, “orig_3ch”
- Candidate’s political Post= “orig_may”, “orig_leg”
- Candidate’s occupation= “orig_law”, “orig_teach”
- Candidate’s spouse’s Occupation= “orig_UN_sp”, “orig_FM_sp”, “orig_MD_sp”
- Candidate’s candidate’s Age= “orig_29”, “orig_45”, orig_65”
- CJ choice task= “winner”
3 Task
- Postulate Hypothesises/Expectation
- Estimate the AMCE for the candidates’ traits
- See if your Hypothesises/Expectation hold
- Interpret the AMCE
- Re-estimate the AMCE using a simple OLS
- What happened?
- Re-estimate the AMCE using a logit model
- What happened to the coefficients? How can we interpret them?
- [OPTIONAL] Estimate the AMCE in the voter sample
- Are there any differences?
- Plot the results
- Test for respondent’s fatigue
# load the data
<- readr::read_csv("https://github.com/albertostefanelli/conjoint_class/raw/master/data/teele.csv") teele_data
References
Teele, Dawn Langan, Joshua Kalla, and Frances Rosenbluth. 2018. “The Ties That Double Bind: Social Roles and Women’s Underrepresentation in Politics.” American Political Science Review 112 (3): 525–41. https://doi.org/gdwd55.