In this homework, you will have to work with the experiment data we collected for this class. 1. We are interested in whether some people were more likely to make correct guesses. What are the summary...


In this homework, you will have to work with the experiment data we collected for this class.



1. We are interested in whether some people were more likely to make correct guesses. What are the summary statistics for all draws? Plot a histogram. Are there any outliers in the data (i.e. individuals who guess 0 times correctly and individuals who guessed all 20 times correctly?)


2. Redo the analyses we did in class excluding outliers. Do you still see the different in the experimental groups after outliers are eliminated? Do you see differences between the first and the last rolls? Are there any differences by gender?


3. Split your sample into the "younger" half and the "older half. Are there differences between the two age groups?


4. Respondents were asked to re-write the message they were shown. Read read write-ups and decide if they were accurate or not. What is the proportion of accurate write-ups? Rerun the analyses with only accurate write-ups. Do you get any differences these time?






(the attached hw 5 is not the solution but for your reference in approaching the problem - codes will need little tweaks according to the question)




norms <- read_csv("norm-framing="" experiment.csv",="" skip="2)" columns=""><- read_csv("norm-framing="" experiment.csv",="" n_max="1," col_names="F)" colnames(norms)=""><- columns="" #="" 6.2.="" analysis="" of="" the="" experiment="" #="" first="" let's="" load="" the="" experiment="" in="" r="" norms=""><- read_csv("norm-framing="" experiment.csv",="" skip="2)" columns=""><- read_csv("norm-framing="" experiment.csv",="" n_max="1," col_names="F)" colnames(norms)=""><- columns="" rm(columns)="" colnames(norms)="" #="" let's="" look="" at="" the="" gender="" composition="" of="" the="" respondents:="" table(norms$gender)="" #="" now="" let's="" look="" at="" the="" age="" composition="" table(norms$age)="" hist(norms$age)="" #="" note="" that="" this="" will="" not="" work!!!!!!!="" norms="" %="">% select(Age) %>% ggplot(aes(x = Age)) + geom_histogram() #Let's try and figure out what the problem is: colnames(norms) unique(colnames(norms)) # Let's create a new file without these problems: norms2 <- norms[,="" c("random="" id",="" "age",="" "gender",="" "control_msg",="" "norm_pos_msg",="" "norm_neg_msg",="" "emp_pos_msg",="" "emp_neg_msg",="" "outcome1",="" "outcome2",="" "outcome3",="" "outcome4",="" "outcome5",="" "outcome6",="" "outcome7",="" "outcome8",="" "outcome9",="" "outcome10",="" "outcome11",="" "outcome12",="" "outcome13",="" "outcome14",="" "outcome15",="" "outcome16",="" "outcome17",="" "outcome18",="" "outcome19",="" "outcome20"="" )]="" norms2="" %="">% ggplot(aes(x = Age)) + geom_histogram() # And yay it works now norms2 %>% gather(key = outcome, value = result, Outcome1, Outcome2, Outcome3, Outcome4, Outcome5, Outcome6, Outcome6, Outcome7, Outcome8, Outcome9, Outcome10, Outcome11, Outcome12, Outcome13, Outcome14, Outcome15, Outcome16, Outcome17, Outcome18, Outcome19, Outcome20) norms3 <- norms2="" %="">% gather(key = outcome, value = result, Outcome1, Outcome2, Outcome3, Outcome4, Outcome5, Outcome6, Outcome6, Outcome7, Outcome8, Outcome9, Outcome10, Outcome11, Outcome12, Outcome13, Outcome14, Outcome15, Outcome16, Outcome17, Outcome18, Outcome19, Outcome20) table(norms3$result) norms3 <- norms3="" %="">% mutate(result = ifelse(result == "Yes (bonus payment of $0.10)", 1,0)) norms3 <- norms3="" %="">% mutate(draw = sub("Outcome", "", outcome)) norms3 <- norms3="" %="">% mutate(draw = as.numeric(draw)) # Does the result depenf on the dtaw? norms3 %>% group_by(draw) %>% summarize(mean(result)) %>% ggplot(aes(x = draw, y = `mean(result)`)) + geom_line() # is there an effect of gender norms3 %>% group_by(Gender, draw) %>% summarize(mean(result)) %>% ggplot(aes(x = draw, y = `mean(result)`, col = Gender)) + geom_line() # Does the result depend on what message was shpwn: norms3 %>% mutate(message = case_when(Control_Msg != "" ~ 0, Norm_Pos_Msg != "" ~ 1, Norm_Neg_Msg != "" ~ 2, Emp_Pos_Msg != "" ~ 3, Emp_Neg_Msg != "" ~ 4)) norms4 <- norms3="" %="">% mutate(message = case_when(Control_Msg != "" ~ 0, Norm_Pos_Msg != "" ~ 1, Norm_Neg_Msg != "" ~ 2, Emp_Pos_Msg != "" ~ 3, Emp_Neg_Msg != "" ~ 4)) norms4 %>% group_by(message) %>% summarize(mean(result)) norms4 %>% group_by(message) %>% summarize(mean(result)) %>% ggplot(aes(x = message, y = `mean(result)`)) + geom_bar(stat = "identity") norms4 %>% group_by(message) %>% summarize(mean(result)) %>% ggplot(aes(x = message, y = `mean(result)`)) + geom_bar(stat = "identity") + geom_hline(aes(yintercept = 1/6), col = "red")
Oct 27, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here