[R] Logistic and Linear Regression Libraries

Mark Difford mark_difford at yahoo.co.uk
Sat Oct 31 08:33:33 CET 2009


Hi Phil,

>> So far for logistic regression I've tried glm(MASS) and lrm (Design) and
>> found there is a big 
>> difference. 

Be sure that you mean what you say, that you are saying what you mean, and
that you know what you mean when making such statements, especially on this
list. glm is not in MASS, so perhaps you mean polr in package MASS. And no,
there is no big difference. You are doing something wrong.

## Edited output from polr and lrm
> house.lrm <- lrm(Sat ~ Infl + Type + Cont, weights = Freq, data = housing)
> house.lrm

Logistic Regression Model

lrm(formula = Sat ~ Infl + Type + Cont, data = housing, weights = Freq)


<snip>
               Coef    S.E.    Wald Z P     
y>=Medium       0.4961 0.12485  3.97  0.0001
y>=High        -0.6907 0.12547 -5.50  0.0000
Infl=Medium     0.5664 0.10465  5.41  0.0000
Infl=High       1.2888 0.12716 10.14  0.0000
Type=Apartment -0.5724 0.11924 -4.80  0.0000
Type=Atrium    -0.3662 0.15517 -2.36  0.0183
Type=Terrace   -1.0910 0.15149 -7.20  0.0000
Cont=High       0.3603 0.09554  3.77  0.0002

> house.plr <- polr(Sat ~ Infl + Type + Cont, weights = Freq, data =
> housing)
> summary(house.plr)

Re-fitting to get Hessian

Call:
polr(formula = Sat ~ Infl + Type + Cont, data = housing, weights = Freq)

Coefficients:
                   Value Std. Error   t value
InflMedium     0.5663937 0.10465285  5.412120
InflHigh       1.2888191 0.12715641 10.135699
TypeApartment -0.5723501 0.11923824 -4.800055
TypeAtrium    -0.3661866 0.15517362 -2.359851
TypeTerrace   -1.0910149 0.15148617 -7.202076
ContHigh       0.3602841 0.09553587  3.771192

<snip>

Regards, Mark.



tdm wrote:
> 
> Hi all,
> 
> I'm trying to discover the options available to me for logistic and linear
> regression. I'm doing some tests on a dataset and want to see how
> different flavours of the algorithms cope. 
> 
> So far for logistic regression I've tried glm(MASS) and lrm (Design) and
> found there is a big difference. Is there a list anywhere detailing the
> options available which details the specific algorithms used?
> 
> Thanks in advance,
> 
> Phil
> 
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/Logistic-and-Linear-Regression-Libraries-tp26140248p26140375.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list