作者leo790124 (4浩)
看板R_Language
标题[问题] 有重复观测值的回归该如何写
时间Sun Nov 25 20:37:02 2018
x1 x2 x3 x4 y1 y2 y3
-1 -1 -1 -1 28 27.1 26.2
-1 -1 1 1 46.3 43.5 46.5
-1 1 -1 1 21.9 21 20.1
-1 1 1 -1 52.9 53.7 52
1 -1 -1 1 75 73.1 74.3
1 -1 1 -1 127.7 126.9 128.7
1 1 -1 -1 86.2 86.5 87
1 1 1 1 195 195.9 195.7
想请益Fit a first-order regression model to the data and conduct the residual
analysis.
该如何做
我目前只有会分开做,不知道是否需要合起来?
lm.table <- lm(y1 ~ x1+x2+x3+x4 )
summary(lm.table)
plot(lm.table513)
还是要做anova??
请教大大,谢谢。
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 122.121.15.86
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/R_Language/M.1543149425.A.FE0.html
1F:→ andrew43: 在不清楚y1-y3是什麽之前并不能确定「合起来」可怎麽做 11/25 23:14
2F:→ andrew43: 例如,y1-y3只是同受测者的随机重覆测量吗? 11/25 23:15
3F:→ leo790124: 是的,重复观测资料 11/26 08:33
5F:→ andrew43: 不过这样写就差不多是把y1-3平均成应变数 11/26 15:28