全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
2020 3
2012-03-27
悬赏 50 个论坛币 未解决
我的模型是这样的,:y(ijt)=0.65*x(ijt)+v(i)+u(it)+e(ijt);i=1,,,,3;j=1,,,4;t=1,,,3;
v(i)是空间效应,在sas中用的是sp(pow)空间结构,u(it)服从AR(1)过程;
我的sas程序中,数据集中的数据是我按照一定分布模拟随机产生的,i表示area,j表示unit,t表示time。具体如下:
data moni;
input id x area unit time y;
datalines;
1 46.42160455 1 1 1 34.92458972
2 -24.72922685 1 1 2 -13.27412848
3 26.11672926 1 1 3 20.95302536
4 61.95090503 1 2 1 43.60223609
5 -40.60201828 1 2 2 -22.45660131
6 -5.070960253 1 2 3 0.985620198
7 -90.12559936 1 3 1 -55.37640561
8 82.54204128 1 3 2 56.46233792
9 -39.98879695 1 3 3 -24.02155711
10 -17.83839448 1 4 1 -8.731479088
11 8.75143445 1 4 2 8.110030921
12 5.282427054 1 4 3 5.734497884
13 -23.59860891 2 1 1 -7.044457101
14 -18.07840265 2 1 2 -2.094160532
15 218.0820714 2 1 3 148.3448954
16 50.38448211 2 6 1 40.60458512
17 -37.41395848 2 2 2 -18.85154526
18 34.25926693 2 2 3 28.19614168
19 6.942405343 2 3 1 13.30508786
20 -59.25429887 2 3 2 -32.42303916
21 72.90556742 2 3 3 53.26061119
22 11.58605756 2 4 1 17.32122626
23 37.39171878 2 4 2 28.77509932
24 1.201558532 2 4 3 5.799683404
25 -130.177745 3 1 1 -92.84541993
26 -20.47267961 3 1 2 -22.92239972
27 -14.67473979 3 1 3 -19.59641389
28 -57.47069086 3 2 1 -46.41458492
29 6.010672415 3 2 2 -7.484832837
30 75.04575555 3 2 3 40.19475313
31 -23.7885469 3 3 1 -21.17102451
32 61.03347368 3 3 2 27.81612491
33 -2.134804355 3 3 3 -11.44658891
34 33.4716502 3 4 1 15.53202632
35 43.16132209 3 4 2 18.29266987
36 -20.00510205 3 4 3 -22.9441564
;
ods graphics on;
proc mixed data=moni mmeq covtest;
class area unit time;
model y=x/noint s residual outpred=moni2;
random area/type=sp(pow)(area) subject=area;
random time(area)/type=AR(1) subject=time(area);
run;
ods graphics off;

现在我觉得自己在两个random语句中的表示有问题,导致出来的结果不行,同时我想知道的是,在sp(pow)中,area之间的距离d应该如何在程序中体现出来呢?有急用,求高手帮忙。
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2012-3-27 01:03:00
自己先顶一下吧
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2012-3-27 01:50:52
I attached my result that run on my SAS v9.2 with this reply, if you think this is not the result that you want, I think you can give some estimate or parms in the model to make the result you expected close to it by using statment estimate and/or parms, such as:
复制代码


and also you can read the sas publishing book "SAS System for Mixed Models";
proc_mixed_result.txt
大小:(19.04 KB)

 马上下载


二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2012-3-27 10:32:51
情迷仲夏夜 发表于 2012-3-27 01:50
I attached my result that run on my SAS v9.2 with this reply, if you think this is not the result th ...
你好,在你给的结果中,
  Covariance Parameter Estimates

                                       Standard         Z
Cov Parm     Subject       Estimate       Error     Value        Pr Z

Variance     area           46.8855     38.8348      1.21      0.1137
SP(POW)      area            0.9000           0       .         .
Variance     time(area)      1.6298      1.1904      1.37      0.0855
AR(1)        time(area)           0           .       .         .
Residual                     1.4337      0.3993      3.59      0.0002
这样看来,对AR(1)中的参数fi估计为0,但是不应该是0啊。同时,我觉得是不是SP(pow)那边的参数结果我觉得也不是那么的理想,我的真实值是0.3,估计是0.9。现在我的问题是这样的,在上述的模型中,应该怎么编辑v(i)和u(it)的部分,因为我觉得空间效应只和i有关,时间效应和i和t有关,而应变量和固定效应是和i,j,k有关的
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群