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.

  • 1
    $\begingroup$ What does "each observation can be isolated" mean? Can you code one level as 0 and the other as 1 and do a logistic regression? $\endgroup$ – Spacedman Sep 24 '19 at 18:51

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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.