Error in eval(predvars, data, env) : object '....' not found

Hi--doing a school project. We're supposed to be looking at probability and odds ratios. Most of the variables are dummies variables. The goal is to see if there a significant difference in loan acceptance rates between minority and white loan applicants based off post survay data.

I'm not very R-Studio literate.

So I'm not certain what this error means that the object is not found. I'm fairly certain it's included in my logit.mod. I've included the "traceback" which I don't understand what it's saying exactly.


logit.mod <- glm(APPROVE ~ LOANPRC + GDLIN + OBRAT + MARRIED + MALE + BLACK + HISPAN, data = Project_4_Data_edited, family = "binomial")
summary(logit.mod)
Prototype_1 <- data.frame(OBRAT = mean(Project_4_Data_edited$OBRAT), BLACK = 1, HISPAN = 0)
Prototype_2 <- data.frame(OBRAT = mean(Project_4_Data_edited$OBRAT), Black = 0, HISPAN = 1)
Prototype_3 <- data.frame(OBRAT = mean(Project_4_Data_edited$OBRAT), BLACK = 0, HISPAN = 0)
Prototype_4 <- data.frame(OBRAT = mean(Project_4_Data_edited$OBRAT), MALE = 1)
Prototype_5 <- data.frame(OBRAT = mean(Project_4_Data_edited$OBRAT), MALE = 0)
Prototype_1$pred.prob <- predict(logit.mod, newdata = Prototype_1, type = "response")
Prototype_2$pred.prob <- predict(logit.mod, newdata = Prototype_2, type = "response")
Prototype_3$pred.prob <- predict(logit.mod, newdata = Prototype_3, type = "response")
Prototype_4$pred.prob <- predict(logit.mod, newdata = Prototype_4, type = "response")
Prototype_5$pred.prob <- predict(logit.mod, newdata = Prototype_5, type = "response")

Error in eval(predvars, data, env) : object 'LOANPRC' not found

I think this error message is saying there is not variable (column) in the data set Project_4_Data_edited with the name of LOANPRC

Perhaps a typo?

I think R software is case sensitive, did you try that?