Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 201839

Issues with logit regression in r

$
0
0

I am trying to run a logit regression and I tried two approaches:

m.logit <- glm(p4 ~ scale(log(gdp,orthodox,swb)),
               data = happiness,
               family = binomial("logit"))
summary(m.logit)

Throws: Error in summary(m.logit) : object 'm.logit' not found

While

m1.logit <- glm(p4 ~ gdp + orthodox + swb, family = binomial(link = "logit"), data = happiness)

Throws: Error in eval(family$initialize) : y values must be 0 <= y <= 1

I kind of understood the errors (in the former case m.logit is not found, and in the latter, I need to transform the variables I think...) but don't know how to solve it...

Any help?


Viewing all articles
Browse latest Browse all 201839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>