Angela: These are statistical, not R, issues I believe, and you appear to be out of your depth statistically here. I suggest you talk to a local statistical resource or, if you can't find such help, post on a statistical site like stats.stackexchange.com.
Cheers, Bert Bert Gunter Genentech Nonclinical Biostatistics (650) 467-7374 "Data is not information. Information is not knowledge. And knowledge is certainly not wisdom." Clifford Stoll On Mon, Mar 2, 2015 at 12:13 PM, Yan Wu <[email protected]> wrote: > Hi, > > I would like to know how to decide the "weight" in a WLS model in R? > > For example, In the" pipeline " data from faraway, I try to fit a > regression model Lab ~ Field (non-constant variance). I wish to use weights > to account for the non-constant variance. So how to decide the weight in > the WLS model? > > For the "pipeline" data, they split the range of Field into 12 groups of > size 9. within each group, and they compute the variance of Lab as "varlab" > and the mean of Field as "meanfield". In addition, they suppose that the > variance in the response is linked to the predictor in the following way: > var(Lab)=a*(Field^b). > > So we could get a estimate of a and b by regress log(varlab) on > log(meanfield). But how to determine weights in a WLS fit of Lab on Field > in R? > > I guess that it may require the function of 'VarConstPower' in R in the > example above. So could you please explain how to use 'VarConstPower' in R? > > I will appreciate it if you could please answer the two questions above. > > Thanks! > Angela > - > > [[alternative HTML version deleted]] > > ______________________________________________ > [email protected] mailing list -- To UNSUBSCRIBE and more, see > 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. ______________________________________________ [email protected] mailing list -- To UNSUBSCRIBE and more, see 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.

