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-tp26140248p26140248.html Sent from the R help mailing list archive at Nabble.com.
Bill.Venables at csiro.au
2009-Oct-31 07:09 UTC
[R] Logistic and Linear Regression Libraries
glm is not, and never was. part of the MASS package. It's in the stats package. Have you sorted out why there is a "big difference" between the results you get using glm and lrm? Are you confident it is due to the algorithms used and not your ability to use the software? To be helpful, if disappointing, I think the answer to your question is "no". You will need to seek out the algorithms from the published information on them individually. W. ________________________________________ From: r-help-bounces at r-project.org [r-help-bounces at r-project.org] On Behalf Of tdm [philb at philbrierley.com] Sent: 31 October 2009 16:53 To: r-help at r-project.org Subject: [R] Logistic and Linear Regression Libraries 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-tp26140248p26140248.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help at r-project.org mailing list 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.
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.lrmLogistic 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.