You are describing a "generalized nonlinear least-squares" estimation procedure.
This is implemented in the gnls() function in "nlme" package. ?gnls Ravi. ____________________________________________________________________ Ravi Varadhan, Ph.D. Assistant Professor, Division of Geriatric Medicine and Gerontology School of Medicine Johns Hopkins University Ph. (410) 502-2619 email: rvarad...@jhmi.edu ----- Original Message ----- From: Derek An <derek...@gmail.com> Date: Wednesday, July 1, 2009 11:50 am Subject: [R] Iteratively Reweighted Least Squares of nonlinear regression To: R-help@r-project.org > Dear all, > > > When doing nonlinear regression, we normally use nls if e are iid normal. > > i learned that if the form of the variance of e is not completely known, > we can use the IRWLS (Iteratively Reweighted Least Squares ) > > algorithm: > > for example, var e*i =*g0+g1*x*1 > > 1. Start with *w**i = *1 > > 2. Use least squares to estimate b. > > 3. Use the residuals to estimate g, perhaps by regressing e^2 on *x*. > > 4. Recompute the weights and goto 2. > > Continue until convergence > > i was wondering whether there is a instruction of R to do this? > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@r-project.org mailing list > > PLEASE do read the posting guide > and provide commented, minimal, self-contained, reproducible code. ______________________________________________ R-help@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.