I have a set of independent variables that are all BINARY, and my dependent variable is also BINARY. Should I use the logistic regression for this - using the glm function? [[alternative HTML version deleted]]
That would be my recommendation. You can use glm() with the argument family = binomial(). - Jordan On Sun, Mar 13, 2016 at 6:42 PM, Ajay Andrews <ajay.andrews at gmail.com> wrote:> I have a set of independent variables that are all BINARY, and my dependent > variable is also BINARY. Should I use the logistic regression for this - > using the glm function? > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >[[alternative HTML version deleted]]
This query is not really appropriate for this list, which is about R programming, not statistical advice (although there is certainly some overlap). You should post to a statistical list like stats.stackexchange.com. Better yet, since you seem to be out of your depth statistically, why not find a local statistical expert with whom to consult? Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Sun, Mar 13, 2016 at 3:42 PM, Ajay Andrews <ajay.andrews at gmail.com> wrote:> I have a set of independent variables that are all BINARY, and my dependent > variable is also BINARY. Should I use the logistic regression for this - > using the glm function? > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.
On 3/13/2016 6:42 PM, Ajay Andrews wrote:> I have a set of independent variables that are all BINARY, and my dependent > variable is also BINARY. Should I use the logistic regression for this - > using the glm function? > > [[alternative HTML version deleted]] >glm(..., family=binomial) will give you what you want. When the independent variables are all categorical, this is sometimes called a logit model. Alternatively, you could also fit a loglinear model, but the logit form is probably simpler.