generated from DS4PS/cpp-525-sum-2020
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
@Dselby86
I am trying to do question 3d using the Predict function:
data2 <- with(data,
data.frame(Democrats = mean(data$Democrats),
Evangelics = mean(data$Evangelics),
Catholics = mean(data$Catholics),
Media = quantile(data$Media, .95),
Merck = mean(data$Merck)))
data2$Adopt_prob <- predict(log, newdata = data2, type = "response")But keep getting the following error:
Error in `$<-.data.frame`(`*tmp*`, Adopt_prob, value = c(`1` = 0.411174458260132, : replacement has 49 rows, data has 1
My data2 data frame looks good, but it seems like the predict function is trying to return too many rows.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
