From murdoch@dunc@n @end|ng |rom gm@||@com  Mon Aug 10 00:05:32 2020
From: murdoch@dunc@n @end|ng |rom gm@||@com (Duncan Murdoch)
Date: Sun, 9 Aug 2020 18:05:32 -0400
Subject: [Rd] lm() takes weights from formula environment
In-Reply-To: <351b0718-6630-18f8-860a-fc0984bf36d7@gmail.com>
References: <C57EF170-CC1D-426A-A659-3EA8B198EBC6@win-vector.com>
 <509f3b0d-d531-20cd-ea34-bd340d5be3b0@gmail.com>
 <BFF38212-4B55-4981-97D1-4738B3454B6E@win-vector.com>
 <351b0718-6630-18f8-860a-fc0984bf36d7@gmail.com>
Message-ID: <d479ad0e-24cd-71a3-d678-0aa312ebcaf5@gmail.com>

On 09/08/2020 3:07 p.m., Duncan Murdoch wrote:
> On 09/08/2020 3:01 p.m., John Mount wrote:
>> Doesn't this preclude "y ~ ." style notations?
> 
> Yes, but you can use "y ~ . - w".

And as was pointed out to me offline, often one doesn't have a simple 
vector w giving the weights, instead one computes the weights from the 
predictors.  So if weights = f(pred), the original "y ~ ." would be fine.

Duncan Murdoch



[Rd] lm() takes weights from formula environment
Duncan Murdoch