An embedded and charset-unspecified text was scrubbed... Name: n?o dispon?vel URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20080829/57df9fc7/attachment.pl>
On Fri, 2008-08-29 at 15:37 -0200, Danilo Muniz wrote:> I need to do a model II linear regression, but I could not find out how!! > > I tryed to use the lm function, but I did not discovered how to specify the > model (type I or type II) to the function... could you help me?Jari Oksanen and Pierre Legendre have been working on a Model II regression package/functions. These will be added to the Vegan R-Forge repository real soon now. If you don't get any other suggestions, then perhaps you could contact Jari directly to enquire about the code if "real soon now" is not soon enough for you. Vegan details are here: http://r-forge.r-project.org/projects/vegan/ Where you can get Jari's email address as well. HTH G -- %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% Dr. Gavin Simpson [t] +44 (0)20 7679 0522 ECRC, UCL Geography, [f] +44 (0)20 7679 0565 Pearson Building, [e] gavin.simpsonATNOSPAMucl.ac.uk Gower Street, London [w] http://www.ucl.ac.uk/~ucfagls/ UK. WC1E 6BT. [w] http://www.freshwaters.org.uk %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
Dear Danilo: Here is one approach with the formal reference being: Computational Statistics & Data Analysis 23 ( 1997 ) 355-372 COMPUTATIONAL STATISTICS & DATA ANALYSIS Generalization of the geometric mean functional relationship Norman R. Draper, Yonghong (Fred) Yang Department of Statistics, 1210 West Dayton Street, Madison, WI 53706-1685, USA Received February 1995; revised February 1996 Here is the S version of their program (for two predictor variables): Appendix The Splus code has been used to specify the weight functions and fit the model: Specify the weight function: weight < - function(y,x 1,x2,b0,b 1,b2) { pred <-b0+b l*x 1 ?b2*x2 parms <-abs(b 1"b2)^(1/3) (y-pred)/parms } Fit the model gmfit < -nls(~weight(y,x 1,x2,b0,b 1,b2), observe,list("starting value")) Hope this helps. MCG -----Original Message----- From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of Danilo Muniz Sent: Friday, August 29, 2008 11:37 AM To: r-help at r-project.org Subject: [R] model II regression - how do I do it? I need to do a model II linear regression, but I could not find out how!! I tryed to use the lm function, but I did not discovered how to specify the model (type I or type II) to the function... could you help me? -- Danilo Muniz [Gruingas Abdiel] [[alternative HTML version deleted]] ______________________________________________ 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 Danilo,>> I need to do a model II linear regression, but I could not find out how!!The smatr package does so-called model II (major axis) regression. Regards, Mark. Danilo Muniz wrote:> > I need to do a model II linear regression, but I could not find out how!! > > I tryed to use the lm function, but I did not discovered how to specify > the > model (type I or type II) to the function... could you help me? > > -- > Danilo Muniz > [Gruingas Abdiel] > > [[alternative HTML version deleted]] > > ______________________________________________ > 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. > >-- View this message in context: http://www.nabble.com/model-II-regression---how-do-I-do-it--tp19224427p19225640.html Sent from the R help mailing list archive at Nabble.com.
Hi Danilo,>> I need to do a model II linear regression, but I could not find out how!!The smatr package does so-called model II (major axis) regression. Regards, Mark. Danilo Muniz wrote:> > I need to do a model II linear regression, but I could not find out how!! > > I tryed to use the lm function, but I did not discovered how to specify > the > model (type I or type II) to the function... could you help me? > > -- > Danilo Muniz > [Gruingas Abdiel] > > [[alternative HTML version deleted]] > > ______________________________________________ > 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. > >-- View this message in context: http://www.nabble.com/model-II-regression---how-do-I-do-it--tp19224427p19225663.html Sent from the R help mailing list archive at Nabble.com.
On Friday 29 August 2008, Mark Difford wrote:> Hi Danilo, > > >> I need to do a model II linear regression, but I could not find out > >> how!! > > The smatr package does so-called model II (major axis) regression. > > Regards, Mark.While this topic is fresh, are there any compelling reasons to use Model II regression? Cheers, Dylan -- Dylan Beaudette Soil Resource Laboratory http://casoilresource.lawr.ucdavis.edu/ University of California at Davis 530.754.7341
Why Model II Regression? My experience is that for purposes of prediction, the difference between Model I and Model II fits can be quite significant, mostly, of course, near the extremes of the predictor variable(s). There are several approaches and most give pretty similar model parameters but modest slope differences can matter significantly. In my field of biology, error free predictors are the exception, not the rule. MCG -----Original Message----- From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of Dylan Beaudette Sent: Friday, August 29, 2008 1:44 PM To: r-help at r-project.org Cc: Mark Difford Subject: Re: [R] model II regression - how do I do it? On Friday 29 August 2008, Mark Difford wrote:> Hi Danilo, > > >> I need to do a model II linear regression, but I could not find out > >> how!! > > The smatr package does so-called model II (major axis) regression. > > Regards, Mark.While this topic is fresh, are there any compelling reasons to use Model II regression? Cheers, Dylan -- Dylan Beaudette Soil Resource Laboratory http://casoilresource.lawr.ucdavis.edu/ University of California at Davis 530.754.7341 ______________________________________________ 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.
On Fri, Aug 29, 2008 at 2:01 PM, Michael Grant <Michael.Grant at colorado.edu> wrote:> Why Model II Regression? My experience is that for purposes of > prediction, the difference between Model I and Model II fits can be > quite significant, mostly, of course, near the extremes of the predictor > variable(s). There are several approaches and most give pretty similar > model parameters but modest slope differences can matter significantly. > In my field of biology, error free predictors are the exception, not the > rule. > > MCG >Thanks for the comments. As usual all this has happened before (and will probably happen again): http://tolstoy.newcastle.edu.au/R/help/05/06/5992.html Cheers, Dylan> -----Original Message----- > From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] > On Behalf Of Dylan Beaudette > Sent: Friday, August 29, 2008 1:44 PM > To: r-help at r-project.org > Cc: Mark Difford > Subject: Re: [R] model II regression - how do I do it? > > On Friday 29 August 2008, Mark Difford wrote: >> Hi Danilo, >> >> >> I need to do a model II linear regression, but I could not find out >> >> how!! >> >> The smatr package does so-called model II (major axis) regression. >> >> Regards, Mark. > > While this topic is fresh, are there any compelling reasons to use Model > II > regression? > > Cheers, > > Dylan > > -- > Dylan Beaudette > Soil Resource Laboratory > http://casoilresource.lawr.ucdavis.edu/ > University of California at Davis > 530.754.7341 > > ______________________________________________ > 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. >