Data not found message

Hi all, I am trying to performa a simple logistic regresssion in R. i want to see what factors affect the chance of death.
I have been able to summarise and view my factor variables however I keep getting an error message that they are not found when I run my regression.
The formula is as follows:
glm(death ~ age, family = "binomial")


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

any assistance would be greatly appreciated !

should be

glm(death ~ age, data = YOUR_DATA, family = "binomial")

wow that worked thank you so much :slight_smile: do you know how I can also obtain CI's and p-values ? (new to R)

Here's an explainer. glm is tricky at first because it uses different metrics.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.