[R] Standard errors in regression models with interactions terms
rm
rm at wippies.se
Sat Nov 9 13:43:25 CET 2013
In a rather simple regression, I’d like to ask the question, for high trees,
whether it makes a difference (for volume) whether a three is thick.
If my interpretation is correct, for low trees, i.e. for which trees$isHigh
== FALSE, the answer is yes.
The problem is how to "merge" the standard errors. Code follows.
data(trees)
trees$isHigh <- trees$Height > 76
trees$isThick <- trees$Girth > 13
m <- lm(trees$Volume ~ trees$isHigh + trees$isThick +
trees$isHigh:trees$isThick)
summary(m)
I might be mistaken, but a workaround is to rewrite the model as follows,
which shows that the answer is yes. However, I would very much like to know
how to answer the question with the original model.
data(trees)
trees$isLow <- trees$Height <= 76
trees$isThick <- trees$Girth > 13
m <- lm(trees$Volume ~ trees$isLow + trees$isThick +
trees$isLow:trees$isThick)
summary(m)
--
View this message in context: http://r.789695.n4.nabble.com/Standard-errors-in-regression-models-with-interactions-terms-tp4680104.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list