What kinds of data cannot be put into a glm? I have tried everything to get my regression model to converge, but it will not. I have a dataset with 82 variables. Does the data have to be continuous? I cleaned the data and tried maxit=100.
Can you share the data you are trying to use or provide a reproducible example? Can you at least provide the error message you are receiving?
Maybe you can help me with my code too! I am trying to predict whether a customer liked the meal or not in a restaurant. So it is binary 1=satisfied , 0=unsatisfied.
name_id order_id food_type satisfied_unsatisfied 582 115688 meat 0 582 115689 meat 1 582 115691 meat 0 582 115692 meat 0 8 1384 salad 0 8 1385 meat 0 8 1386 meat 0 262 1387 meat 0 262 1388 meat 0 262 1389 salad 0
Here is the code I am running and am not getting a percentage between 0 and 1 for predictions of satisfaction. What should be in the column for your test dataset for the predictions to replace? Is it blank or NA?
library(ggplot2) library(dplyr) train=read.csv("C:\\Users\\jb\\Downloads\\Food_Training2.csv") attach(train) head(train) ###Predict Satisfaction#### train.clean=na.exclude(train) model=glm(satisfied_unsatisfied~.,data = train.clean,family = binomial(link = "logit")) summary(model) p.sat=predict(model,newdata=train.clean,type="response") test=read.csv("C:\\Users\\jb\\Downloads\\Food_Testing2.csv") p1=predict(model,test) p.off=rep(NA,nrow(test)) data=data.frame(order_id=1:nrow(test),satisfied_unsatisfied=p.sat)