Re: [R] R.squared in summary.lm with weights

2016-04-10 Thread Murray Efford
2016 5:31 a.m. To: Murray Efford Cc: r-help@r-project.org; Martin Maechler; peter dalgaard Subject: Re: [R] R.squared in summary.lm with weights > On Apr 10, 2016, at 9:38 AM, David Winsemius wrote: > >> >> On Apr 10, 2016, at 3:11 AM, Murray Efford wrote: >> >> Martin - &

Re: [R] R.squared in summary.lm with weights

2016-04-10 Thread David Winsemius
pics does seem to complicate that process. I counted 9 packages with PRESS functions even after excluding the ones related to "the Press" and "protein residues" when I did a search with: sos::findFn("PRESS") -- David. > > -- > > David. > &g

Re: [R] R.squared in summary.lm with weights

2016-04-10 Thread David Winsemius
t; > > From: Martin Maechler > Sent: Sunday, 10 April 2016 4:07 a.m. > To: Murray Efford > Cc: peter dalgaard; Duncan Murdoch; r-help@r-project.org > Subject: Re: [R] R.squared in summary.lm with weights > >>>>>> Murra

Re: [R] R.squared in summary.lm with weights

2016-04-10 Thread Murray Efford
_ From: Martin Maechler Sent: Sunday, 10 April 2016 4:07 a.m. To: Murray Efford Cc: peter dalgaard; Duncan Murdoch; r-help@r-project.org Subject: Re: [R] R.squared in summary.lm with weights >>>>> Murray Efford >>>>> on Fri, 8 Apr 2016 18:45:33 + w

Re: [R] R.squared in summary.lm with weights

2016-04-09 Thread Martin Maechler
> Murray Efford > on Fri, 8 Apr 2016 18:45:33 + writes: > Thanks for these perfectly consistent replies - I didn't > understand the purpose of m = sum(w * f/sum(w)) and saw it > merely as a weighted average of the fitted values. My > ultimate concern is how to com

Re: [R] R.squared in summary.lm with weights

2016-04-08 Thread Murray Efford
To: Duncan Murdoch Cc: Murray Efford; r-help@r-project.org Subject: Re: [R] R.squared in summary.lm with weights On 08 Apr 2016, at 12:57 , Duncan Murdoch wrote: > On 07/04/2016 5:21 PM, Murray Efford wrote: >> Following some old advice on this list, I have been reading the code for >>

Re: [R] R.squared in summary.lm with weights

2016-04-08 Thread peter dalgaard
On 08 Apr 2016, at 12:57 , Duncan Murdoch wrote: > On 07/04/2016 5:21 PM, Murray Efford wrote: >> Following some old advice on this list, I have been reading the code for >> summary.lm to understand the computation of R-squared from a weighted >> regression. Usually weights in lm are applied t

Re: [R] R.squared in summary.lm with weights

2016-04-08 Thread Duncan Murdoch
On 07/04/2016 5:21 PM, Murray Efford wrote: Following some old advice on this list, I have been reading the code for summary.lm to understand the computation of R-squared from a weighted regression. Usually weights in lm are applied to squared residuals, but I see that the weighted mean of the

Re: [R] R.squared in summary.lm with weights

2016-04-07 Thread Murray Efford
hd625b Sent: Friday, 8 April 2016 9:51 a.m. To: r-help@r-project.org Subject: Re: [R] R.squared in summary.lm with weights Do you mean w <- z$residuals ? Type names(z) to see the list of item in your model. I ran your code on a lm and it work fine. You don't need the brackets ar

Re: [R] R.squared in summary.lm with weights

2016-04-07 Thread hd625b
Do you mean w <- z$residuals ? Type names(z) to see the list of item in your model. I ran your code on a lm and it work fine. You don't need the brackets around mss <- Michael Long On 04/07/2016 02:21 PM, Murray Efford wrote: Following some old advice on this list, I have been reading the c

[R] R.squared in summary.lm with weights

2016-04-07 Thread Murray Efford
Following some old advice on this list, I have been reading the code for summary.lm to understand the computation of R-squared from a weighted regression. Usually weights in lm are applied to squared residuals, but I see that the weighted mean of the observations is calculated as if the weights