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

2006-09-27 Thread Chuck Cleland
Henrik Parn wrote:
> 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?

You might have a look at the effects package by John Fox.

http://socserv.mcmaster.ca/jfox/Misc/effects/index.html

> <>
> <>
> <>Thanks in advance for any advice!
> <><>
> Best regards,
> 
> Henrik
> <>

-- 
Chuck Cleland, Ph.D.
NDRI, Inc.
71 West 23rd Street, 8th floor
New York, NY 10010
tel: (212) 845-4495 (Tu, Th)
tel: (732) 512-0171 (M, W, F)
fax: (917) 438-0894

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


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

2006-09-27 Thread Henrik Parn
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)

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.