Open DMBurwell opened 3 years ago
Hi! I am getting an error message when running the probability formula for Q3c.
Error in $<-.data.frame(*tmp*, AdoptionP, value = c(1 = 0.355317313242931, : replacement has 49 rows, data has 1
$<-.data.frame
*tmp*
1
I also can't run the code without the data$ in front of Evangelic within the mean command. This is less of an issue as it is just annoying...
Error in mean(Evangelic) : object 'Evangelic' not found
data2 <- with(data, data.frame(Adoption = 1, Democrats = mean(Democrats), Evangelic = mean(data$Evangelic), Catholics = mean(Catholics), Media = mean(Media), Merck = mean(Merck))) data2$AdoptionP <- predict(log, newdata = data2, type = "response") data2$AdoptionP
Thanks for the help!
Hi,
You are missing the "s" in Evangelic. If you try data$Evangelics, it will work.
https://github.com/DS4PS/cpp-525-fall-2020/issues/23#issuecomment-894934901
Hi! I am getting an error message when running the probability formula for Q3c.
Error in
$<-.data.frame
(*tmp*
, AdoptionP, value = c(1
= 0.355317313242931, : replacement has 49 rows, data has 1I also can't run the code without the data$ in front of Evangelic within the mean command. This is less of an issue as it is just annoying...
Error in mean(Evangelic) : object 'Evangelic' not found
Thanks for the help!