[R] model II regression - how do I do it?
Michael Grant
Michael.Grant at Colorado.EDU
Fri Aug 29 20:34:39 CEST 2008
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.
More information about the R-help
mailing list