楼主: nfai
17608 10

[编程问题求助] 急求横截面数据的自相关DW检验语句 [推广有奖]

  • 0关注
  • 0粉丝

小学生

50%

还不是VIP/贵宾

-

威望
0
论坛币
0 个
通用积分
0
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
36 点
帖子
3
精华
0
在线时间
11 小时
注册时间
2010-5-22
最后登录
2014-4-18

楼主
nfai 发表于 2013-1-13 22:25:44 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
那位会横截面数据的自相关检验啊? DW检验或者其他检验方法都行,求程序语句,在线等
二维码

扫码加我 拉你入群

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

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

关键词:横截面数据 截面数据 DW检验 横截面 自相关 横截面 在线 程序

沙发
逍遥梦蝶 发表于 2013-1-13 22:30:28
你确定是横截面数据要做自相关检验?是要检验存在空间自相关吗?
传统的理论里认为横截面数据是不大可能存在自相关问题的,更可能存在异方差问题。
自相关在时间序列的数据里用得多。

藤椅
nfai 发表于 2013-1-13 22:33:04
逍遥梦蝶 发表于 2013-1-13 22:30
你确定是横截面数据要做自相关检验?是要检验存在空间自相关吗?
传统的理论里认为横截面数据是不大可能存在 ...
是的,要求自相关和异方差都要进行检验

板凳
benxiaoyu 在职认证  发表于 2013-1-13 22:36:26
................................

报纸
逍遥梦蝶 发表于 2013-1-13 22:36:29
nfai 发表于 2013-1-13 22:33
是的,要求自相关和异方差都要进行检验
空间自相关用stata怎么做我还真不知道,你可以求助下版主~呵呵!

地板
逍遥梦蝶 发表于 2013-1-13 22:37:19
nfai 发表于 2013-1-13 22:33
是的,要求自相关和异方差都要进行检验
你可以把题贴出来看看呗~

7
nfai 发表于 2013-1-13 22:40:03
逍遥梦蝶 发表于 2013-1-13 22:36
空间自相关用stata怎么做我还真不知道,你可以求助下版主~呵呵!
呵呵,我是个新手,麻烦问下该怎么求助版主啊?

8
蓝色 发表于 2013-1-15 11:27:34
对于横截面自相关你还是先找到文献
查查计算公式吧

逍遥梦蝶  说的没错,空间自相关好解释,
一般的横截面数据 你能说明没什么有自相关吗?

所以,你最好先查好理论,然后再说软件的事情
许多情况下需要自己更加公式编程

9
蓝色 发表于 2013-1-15 11:39:29
---------------------------------------------------------------------------------------------------------------------------------
help for spatcorr                                                                                                 (STB-60: sg162)
---------------------------------------------------------------------------------------------------------------------------------

Spatial correlogram

        spatcorr varname , bands(numlist) xcoord(varname) ycoord(varname) [ geary cumulative twotail graph needle
              savegraph(filename [, replace]) ]


Description

spatcorr computes and optionally plots Moran's I or Geary's c spatial correlogram based on two or more consecutive or cumulative
distance bands. For each distance band, spatcorr computes and displays in tabular form the requested statistic, the expected
value of the statistic under the null hypothesis of global spatial independence, the standard deviation of the statistic, the
z-value, and the corresponding 1-tail or 2-tail p-value.


Options

bands(numlist) is always required. It specifies the sequence of lower and upper bounds of the distance bands to be used in the
    calculation of the spatial correlogram. For example, if option bands(0 2 4 6) is specified and option cumulative is not
    specified, then the spatial correlogram will be computed on the following consecutive distance bands: (0-2], (2-4], (4-6]. On
    the other hand, if option cumulative is specified, then the spatial correlogram will be computed on the following cumulative
    distance bands: (0-2], (0-4], (0-6].

xcoord(varname) is always required. It specifies the name of the variable containing the x-coordinate of each location object of
    analysis.

ycoord(varname) is always required. It specifies the name of the variable containing the y-coordinate of each location object of
    analysis. Both the x-coordinate and the y-coordinate must be expressed in projected units, e.g., meters, kilometers, miles,
    or arbitrary digitizing units.

geary requests that Geary's c spatial correlogram be computed and optionally plotted instead of the default Moran's I spatial
    correlogram.

cumulative requests that cumulative distance bands be used instead of the default consecutive distance bands.

twotail requests that 2-tail p-values be computed and displayed instead of the default 1-tail p-values.

graph requests that the spatial correlogram be plotted.

needle requests that the spatial correlogram be plotted using vertical lines from zero (if Moran's I) or one (if Geary's c) to
    the computed statistics instead of lines that connect the computed statistics.

savegraph(filename [, replace]) requests that the graph be saved in filename. If filename exists, an error will occur unless
    replace is also specified. filename must have one of the following extensions: .ps, .eps, .prn, or .wmf.


Examples

        . spatcorr crime, bands(0(1)5) xcoord(x) ycoord(y)

        . spatcorr crime, bands(0(1)5) xcoord(x) ycoord(y) cumulative

        . spatcorr crime, bands(0(1)5) xcoord(x) ycoord(y) graph


Author

        Maurizio Pisati
        Department of Sociology and Social Research
        University of Milano Bicocca - Italy
        maurizio.pisati@galactica.it


Also see

On-line:  help for spatwmat, spatgsa, spatlsa, spatdiag, spatreg if installed

10
zjying2000 在职认证  发表于 2013-12-19 12:30:32
DW检验 在stata 中,只在时间序列中才能进行序列相关检验,因此截面数据中仍然要生成一个伪时 间变量,并且把数据设置为时间序列。而时间序列中则可以直接进行dw 检验。DW 检验只 适用于一阶自相关。 ————————————模板———————————— quietly regress 被解释变量 解释变量若干 generate t=_n tset t estat dwatson ————————————模板———————————— 当数据时截面数据时,需要generate 和tset 语句: Generate 生成伪时间变量t;tset 将数据设置为时间序列数据。
已有 1 人评分学术水平 热心指数 信用等级 收起 理由
spsssas + 1 + 1 + 1 精彩帖子

总评分: 学术水平 + 1  热心指数 + 1  信用等级 + 1   查看全部评分

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注jltj
拉您入交流群
GMT+8, 2026-1-5 14:35