[R] logistic regression by group?

Noah Silverman noah at smartmediacorp.com
Thu Mar 4 06:56:13 CET 2010


Looking for a function in R that can help me calculate a parameter that
maximizes the likelihood over groups of observations.

The general formula is:

p = exp(xb) / sum(exp(xb))

So, according to the formulas I've seen published, to do this "by group" is

product(p = exp(x_i * b_i) / sum(exp(x_i b_i)))

Where i represents a "group" and we iterate through each group.

Does anybody have any suggestions?



More information about the R-help mailing list