[R] lm with data=(means,sds,ns)

(Ted Harding) Ted.Harding at nessie.mcc.ac.uk
Sun Apr 18 13:26:51 CEST 2004

Thanks, Brian!

On 18-Apr-04 Prof Brian Ripley wrote:
> The short answer is no, as there is no way to recover the fitted values

Well, the fitted values (a + b*x_i) would be available, as would be
the estimates and SEs of coefficients, sums of squares, and relevant
F ratios and P values.

> and residuals so you can't get a proper fit object of class "lm" (and 
> hence get `summaries and all').

Residuals granted. However, much of what is useful in 'summary.lm'
would be supported. So also (which is what I really wanted a lazy
route to) would be the requisite summary statistics to generate
confidence and prediction bands as in 'predict.lm'.

> Your pseudo-data method needs to fix the u_i to be mean zero,
> variance one in the sample.  That is probably the quickest method. 
> The elegant one is to create a new class "groupedlm" and write a
> constructor etc for it

That's the sort of thing I feared! No time for that at the moment,
though one day I may find it to be an absorbing exercise in extending
my R skills and understanding.

Anyway, I'm grateful to know what the position is. At least I can now
feel happy about having to roll up my sleeves and get stuck in the
hard way.

Best wishes,

E-Mail: (Ted Harding) <Ted.Harding at nessie.mcc.ac.uk>
Fax-to-email: +44 (0)870 167 1972
Date: 18-Apr-04                                       Time: 12:26:51
------------------------------ XFMail ------------------------------

More information about the R-help mailing list