Select Git revision
ols_time_spent.R
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
ols_time_spent.R 3.99 KiB
library(car)
data <- database_full %>%
group_by(id) %>%
slice(1) %>%
ungroup()
data$Treatment_C <- as.factor(data$Treatment_C)
data$Treatment_D <- as.factor(data$Treatment_D)
data$Treatment_C <- relevel(data$Treatment_C, ref = "No Treatment 3")
data$Treatment_D <- relevel(data$Treatment_D, ref = "No Treatment 3")
ols_time_spent_A<- lm( interviewtime_net_clean ~ as.factor(Treatment_A) ,data)
summary(ols_time_spent_A)
ols_time_spent_control_A<- lm( interviewtime_net_clean ~ as.factor(Treatment_A) + Z_Mean_NR + as.factor(Gender)+Age_mean+ QFIncome + Uni_degree,data)
summary(ols_time_spent_control_A)
ols_time_spent_B<- lm( interviewtime_net_clean ~ as.factor(Treatment_B) ,data)
summary(ols_time_spent_B)
ols_time_spent_control_B<- lm( interviewtime_net_clean ~ as.factor(Treatment_B) + Z_Mean_NR + as.factor(Gender)+Age_mean + QFIncome +Uni_degree,data)
summary(ols_time_spent_control_B)
ols_time_spent_C<- lm( interviewtime_net_clean ~ as.factor(Treatment_C) ,data)
summary(ols_time_spent_C)
ols_time_spent_control_C<- lm( interviewtime_net_clean ~ as.factor(Treatment_C) + Z_Mean_NR + as.factor(Gender)+Age_mean+ QFIncome + Uni_degree,data)
summary(ols_time_spent_control_C)
ols_time_spent_D<- lm( interviewtime_net_clean ~ as.factor(Treatment_D) ,data)
summary(ols_time_spent_D)
ols_time_spent_control_D<- lm( interviewtime_net_clean ~ as.factor(Treatment_D) + Z_Mean_NR + as.factor(Gender)+Age_mean+ QFIncome + Uni_degree,data)
summary(ols_time_spent_control_D)
ols_time_cc_A<- lm( CC_time_mean_clean ~ as.factor(Treatment_A) ,data)
summary(ols_time_cc_A)
ols_time_cc_control_A<- lm( CC_time_mean_clean ~ as.factor(Treatment_A) + Z_Mean_NR + as.factor(Gender)+Age_mean + QFIncome +Uni_degree,data)
summary(ols_time_cc_control_A)
ols_time_cc_B<- lm( CC_time_mean_clean ~ as.factor(Treatment_B) ,data)
summary(ols_time_cc_B)
ols_time_cc_control_B<- lm( CC_time_mean_clean ~ as.factor(Treatment_B) + Z_Mean_NR + as.factor(Gender)+Age_mean + QFIncome + Uni_degree,data)
summary(ols_time_cc_control_B)
ols_time_cc_C<- lm( CC_time_mean_clean ~ as.factor(Treatment_C) ,data)
summary(ols_time_cc_C)
ols_time_cc_control_C<- lm( CC_time_mean_clean ~ as.factor(Treatment_C) + Z_Mean_NR + as.factor(Gender)+Age_mean + QFIncome +Uni_degree,data)
summary(ols_time_cc_control_C)
ols_time_cc_D<- lm( CC_time_mean_clean ~ as.factor(Treatment_D) ,data)
summary(ols_time_cc_D)
ols_time_cc_control_D<- lm( CC_time_mean_clean ~ as.factor(Treatment_D) + Z_Mean_NR + as.factor(Gender)+Age_mean + QFIncome +Uni_degree,data)
summary(ols_time_cc_control_D)
# # Create an HTML results table with customized names and stars
# results_table_5 <- stargazer(
# ols_tme_spent_1, ols_tme_spent_control_1,
# align = TRUE,
# type = "html",
# dep.var.labels = "Interview Time (without Treatments)",
# covariate.labels = c("Treated_A", "Treated_B","No Info choosen", "Video 1", "Video 2", "Text 1", "Text 2",
# "Female", "Divers", "Age", "mittlere Reife", "Abitur", "Berufsausbildung",
# "Hochschulabschluss") ,
# star.cutoffs = c(0.1, 0.05, 0.01), # Custom significance levels
# star.char = c("*", "**", "***") # Custom significance stars
# )
#
# # Save the HTML table to a file
# writeLines(results_table_5, "Estimation_results/ols/time_spent_1.html")
#
# # Create an HTML results table with customized names and stars
# results_table_6 <- stargazer(
# ols_tme_spent_2, ols_tme_spent_control_2,
# align = TRUE,
# type = "html",
# dep.var.labels = "Interview Time (without Treatments)",
# covariate.labels = c("Video", "No Info choosen", "Text",