lm与aov做方差分析有什么区别 ?
请高人指点。
方差分析-lm与aov的区别
Just over top of my head, I think both of lm (linear model) and aov (analysis of variance) use the same idea of lease square. So in terms of mathematics, they are probably indistinguishable, the difference lays in the objectives of the analysis.
lm focus more on comparing the effect of individual factor levels. e.g. suppose you regress 'Height' on 'Gender' with two levels, Female and Male. Consider 'Female' as the 'base' level, and the regression coefficients for 'Male' represents the difference in (average)'Height' between the two groups. Hence, these regression coefficient are usually interpretable/meaningful.
On the other hand, avo emphasis on the effect of factor itself. Using the same example above, it characterized the effect of 'Gender' upon 'Height'. The process will generate a set of dummy variables, hence the regression coefficients are not so trivial to interpret.
Like I say, this is totally off my head, so happy to accept any comment or mistakes! :)
回复 第2楼 的 SnowDrop:Thanks a lot!