Say I have a categorical variable with 2 levels, and for instance 289 people fall in level 1 and 386 fall in level 2. How would I go about modelling such a variable as a logistic response? All examples I've seen are concerning situations where each observation can be isolated.
Logistic regression problem works with atleast two variables. Independent variable - Variable based on which you have to predict your dependent variable.
After you have those, you can input these in simple r code.
Google glm function in R. you should get your answer. Hope, it helps.