作者boshings (bo)
看板Statistics
标题[程式] R如何画残差分析图
时间Thu May 7 01:08:48 2015
[软体程式类别]:
R
[程式问题]:
资料处理、回归
[软体熟悉度]:
低
[问题叙述]:
使用LM函数 跑回归 可以用plot函数 画出残差图
使用PLM函数 跑panel data资料 如何画出残差图?
[程式范例]:
f=lm(d~c,data=a)
plot(f) 可画出残差图
-----------------
da=plm.data(a,index=c('a','b'))
f=plm(d~c, effect='twoways',model='within',data=da)
plot(f) 无法画出残差图
-----------------------------------------------------------------------------
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 36.228.126.89
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/Statistics/M.1430932131.A.828.html
※ 编辑: boshings (36.228.126.89), 05/07/2015 01:09:50
※ 编辑: boshings (36.228.126.89), 05/07/2015 01:33:42
1F:→ celestialgod: plm:::plot.plm没有画残差图,要就自己画 05/07 02:20
2F:→ celestialgod: plot(predict(f), resid(f)) 05/07 02:22
3F:→ boshings: 谢谢C大 05/07 23:24