Re: [R] defining a formula method for a weighted lm()

2011-01-07 Thread Michael Friendly
Thanks, Martin Now I understand 'standard non-standard evaluation' magic, and the code in http://developer.r-project.org/model-fitting-functions.txt explains how this works. Still, I can't help but think of this as evil-magic, for which some anti-magic would be extremely useful, so that a simp

Re: [R] defining a formula method for a weighted lm()

2011-01-06 Thread Martin Maechler
> Michael Friendly > on Thu, 06 Jan 2011 09:33:25 -0500 writes: > No one replied to this, so I'll try again, with a simple example. I > calculate a set of log odds ratios, and turn them into a data frame as > follows: >> library(vcdExtra) >> (lor.CM <- loddsrat

Re: [R] defining a formula method for a weighted lm()

2011-01-06 Thread Michael Friendly
No one replied to this, so I'll try again, with a simple example. I calculate a set of log odds ratios, and turn them into a data frame as follows: > library(vcdExtra) > (lor.CM <- loddsratio(CoalMiners)) log odds ratios for Wheeze and Breathlessness by Age 25-2930-3435-3940-44

[R] defining a formula method for a weighted lm()

2010-12-16 Thread Michael Friendly
In the vcdExtra package on R-Forge, I have functions and generic methods for calculating log odds ratios for R x C x strata tables. I'd like to define methods for fitting weighted lm()s to the resulting loddsratio objects, but I'm having problems figuring out how to do this generally. # install