[R] equivalent of model.tables for an lm.object?

Henrik Parn henrik.parn at bio.ntnu.no
Wed Sep 27 14:31:35 CEST 2006


Dear all,

I run a linear model with three significant explanatory variabels
x1: a factor with 4 levels
x2 and x3: factors with two levels each
x4: continuous

model <- lm(y ~ x1 + x2 * x3 + x4)
<>
The data is not perfectly balanced between the different 
factor-combinations and I use treatment contrasts.
<>
With an aov.object, I assume I could have used model.tables(aov.object, 
type = "means", se = TRUE), to get the means and se for all factor 
combinations.

<>In an lm.object like mine, I calculate the means 'manually' from the 
Estimates (for sure it could be done with a script, but fair enough). 
<>For the standard error of the means, I started out using formulas of a 
variance of a sum of two variables, but I messed things up with the 
interaction. Is there a way to calculate the standard error of the means 
from Estimates and Std.Error (or other information) from the lm.object?
<>
<>
<>Thanks in advance for any advice!
<><>
Best regards,

Henrik
<>

-- 
************************
Henrik Pärn
Department of Biology
NTNU
7491 Trondheim
Norway

+47 735 96282 (office)
+47 909 89 255 (mobile)
+47 735 96100 (fax)



More information about the R-help mailing list