I am implementing a model with logit. How can I look for the variance of the data to measure if the prediction was good the variance of the data to measure if the prediction was good enter code here or not?
m <- glm(a~ f+ EN*RT, family = binomial(link = "logit"),data=df)`
I read I can did something like this, using confidence intervals:
p <- predict(m, newdata=df, type="link",se.fit = T)
critval <- 1.96 ## approx 95% CI
upr <- p$fit + (critval * p$se.fit)
lwr <- p$fit - (critval * p$fit)
fit <- p$fit
mean(((upr-fit)/1.96)^2, na.rm=T)
But the values I get are really huge. I will appreciate your help.