#####Conversion Convert = read.csv(file.choose()) ###Conversion.csv View(Convert) Convert$Convert = as.factor(Convert$Convert) ###Registered and went on to submit data, or not Convert$Reaction = as.factor(Convert$Reaction) ###Considered to suffer a severe reaction (2) or less severe reaction (1) Convert$Regularity = as.factor(Convert$Regularity) ###How often reactions occur for the person who the observation was about Convert$AgeOperate = as.factor(Convert$AgeOperate) ###Age of the person uploading the observation Convert$AgeSubject = as.factor(Convert$AgeSubject) ###Age of the subject (e.g., if <16 years old) Convert$GenderOperate = as.factor(Convert$GenderOperate) ###Gender of the person uploading the observation Convert$GenderSubject = as.factor(Convert$GenderSubject) ###Gender of the person who the observation was about Convert$EthnicityOperate = as.factor(Convert$EthnicityOperate) ###Ethnicity of the person uploading the observation Convert$EthnicitySubject = as.factor(Convert$EthnicitySubject) ###Ethnicity of the person who the observation was about Convert$WorkOperate = as.factor(Convert$WorkOperate) ###Employment status of the person uploading the observation Convert$Hear = as.factor(Convert$Hear) ###How participant had heard about the project model <- glm(Convert$Convert~Convert$EthnicityOperate, family = binomial) ####change vector for predictors summary(model) #####GLMs for engagement library(sjPlot) Engage = read.csv(file.choose()) ###Engagement.csv View(Engage) Engage$Regularity = as.factor(Engage$Regularity) Engage$AgeSubject = as.factor(Engage$AgeSubject) Engage$EthnicityOperate = as.factor(Engage$EthnicityOperate) Engage$EthnicitySubject = as.factor(Engage$EthnicitySubject) Engage$GenderSubject = as.factor(Engage$GenderSubject) Engage$WorkOperate = as.factor(Engage$WorkOperate) Engage$Hear = as.factor(Engage$Hear) Engage$Reaction = as.factor(Engage$Reaction) # with operator variables removed (covary with subject) Engage.GLM = glm(Data.Count~Regularity+AgeSubject+EthnicitySubject+GenderSubject+WorkOperate+Hear+Reaction,family=Gamma(link = "log"), data=Engage) summary(Engage.GLM)