Instructions

Background of the research

The names and descriptions of variables in the data set

Name Description
treatment Treatment (0, 1, 2): control(treatment==0): no canvassers, treatment==1: Same-Sex Marriage Script by Gay Canvasser, treatment==2: Same-Sex Marriage Script by Straight Canvasser,
ssm Support for gay marriage (1 to 5). Higher scores indicate more support.

Be Prepared to Work

Load the Data

Load the “gay_marriage.csv” dataset by using gmarriage as a name to the dataframe.

# view(gay_marriage.csv)
# gmarriage <- gay_marriage.csv
# read.csv ("gmarriage")
# read.csv(gmarriage)

Show your Work

  1. How many observations of this dataset? How many variables of this dataset?
# dim (gmarriage)
#dim(gmarriage)
  1. Calculate the ATE of the experiment for the treatment 1: Same-Sex Marriage Script by Gay Canvasser and interpret your results

Follow the steps:

# Step 1. Calculate the average support for same-sex marriage for the control group: treatment==0
# view(gay_marriage.csv)
# gmarriage <- gay_marriage.csv
# read.csv ("gmarriage")
# read.csv(gmarriage)
# Step 2. Calculate the average support for same-sex marriage for the Same-Sex Marriage Script by Gay Canvasser group: treatment == 1
# view(gay_marriage.csv)
# gmarriage <- gay_marriage.csv
# read.csv ("gmarriage")
# read.csv(gmarriage)
# Step 3. Compute the difference of the mean in support for same sex marriage between treatment group 1 and control group
# view(gay_marriage.csv)
# gmarriage <- gay_marriage.csv
# read.csv ("gmarriage")
# read.csv(gmarriage)
  1. Calculate the ATE of the experiment for the treatment 2: Same-Sex Marriage Script by Straight Canvasser and interpret your results

Follow the steps: Step 1. Calculate the average support for same-sex marriage for the control group: use the object representing the mean for the control group you created in Q2

# Step 2. Calculate the average support for same-sex marriage for the Same-Sex Marriage Script by Straight Canvasser group: treatment == 2
# view(gay_marriage.csv)
# gmarriage <- gay_marriage.csv
# read.csv ("gmarriage")
# read.csv(gmarriage)
# Step 3. Compute the difference of the mean in support for same sex marriage between treatment group 2 and control group
# view(gay_marriage.csv)
# gmarriage <- gay_marriage.csv
# read.csv ("gmarriage")
# read.csv(gmarriage)
  1. How does the interaction with different canvassers affect the public support for same-sex marriage? Here write your interpretation # I cannot write my interpretation because the set is not coming up right for me and I’m overwhelmed with my incapability. I will try to do better next assignment, I just need to catch up on readings and lectures. So sorry to waste your time, I will be better next time.