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")

output:

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.