空间计量模型R操作代码

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

sheng-readOGR(.,shengditu)OGRdatasourcewithdriver:ESRIShapefileSource:.,layer:shengdituwith30featuresand7fieldsFeaturetype:wkbPolygonwith2dimensionssheng_nb-poly2nb(sheng)sheng_nblist-nb2listw(sheng_nb)Y-log(sheng$INCOME)X1-log(sheng$CAIZHENG)X2-log(sheng$YONGDIAN)M0=lm(sheng$INCOME~sheng$CAIZHENG+sheng$YONGDIAN)M0Call:lm(formula=sheng$INCOME~sheng$CAIZHENG+sheng$YONGDIAN)Coefficients:(Intercept)sheng$CAIZHENGsheng$YONGDIAN2242.77621.94090.8433bptest(M0)studentizedBreusch-Pagantestdata:M0BP=13.3794,df=2,p-value=0.001244M1=lm(Y~X1+X2)M1Call:lm(formula=Y~X1+X2)Coefficients:(Intercept)X1X25.90630.14100.2403bptest(M1)studentizedBreusch-Pagantestdata:M1BP=1.0727,df=2,p-value=0.5849空间同步自回归误差模型M5SEAR-errorsarlm(form=Y~X1+X2,listw=sheng_nblist,etype=error)M5SEARCall:errorsarlm(formula=Y~X1+X2,listw=sheng_nblist,etype=error)Type:errorCoefficients:lambda(Intercept)X1X20.68037056.24397140.16982980.1567685Loglikelihood:16.28129空间杜宾误差模型M6SDEM-errorsarlm(formula=Y~X1+X2,listw=sheng_nblist,etype=emixed)M6SDEMCall:errorsarlm(formula=Y~X1+X2,listw=sheng_nblist,etype=emixed)Type:errorCoefficients:lambda(Intercept)X1X2lag.X1lag.X20.3839413295.6064438950.1749807530.1252941500.1271285720.005312641Loglikelihood:18.43699空间自回归滞后模型M7SAR-lagsarlm(Y~X1+X2,listw=sheng_nblist,type=lag)M7SARCall:lagsarlm(formula=Y~X1+X2,listw=sheng_nblist,type=lag)Type:lagCoefficients:rho(Intercept)X1X20.49771382.51428940.15982730.1208989Loglikelihood:19.10202空间杜宾模型M8SDM-lagsarlm(Y~X1+X2,list=sheng_nblist,type=mixed)M8SDMCall:lagsarlm(formula=Y~X1+X2,listw=sheng_nblist,type=mixed)Type:mixedCoefficients:rho(Intercept)X1X2lag.X10.447347782.941688440.157339440.125535960.03462418lag.X2-0.05020476Loglikelihood:19.35204一般空间模型SACSARARM9SAC-sacsarlm(Y~X1+X2,listw=sheng_nblist,type=sac)M9SACCall:sacsarlm(formula=Y~X1+X2,listw=sheng_nblist,type=sac)Type:sacCoefficients:rholambda(Intercept)X1X20.6237129-0.38677861.68204350.14026770.1090523Loglikelihood:19.50472M9SARMA-sacsarlm(Y~X1+X2,listw=sheng_nblist,type=sacmixed)M9SARMACall:sacsarlm(formula=Y~X1+X2,listw=sheng_nblist,type=sacmixed)Type:sacmixedCoefficients:rholambda(Intercept)0.72462052-0.520292811.26735141X1X2lag.X10.137941670.13100192-0.02403913lag.X2-0.07284195Loglikelihood:19.859

1 / 4
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功