由买买提看人间百态

topics

全部话题 - 话题: svy
(共0页)
a*****b
发帖数: 2789
1
Hi all,
I have a question about reading multiple data files by SPSS.
For example, I have more than thousand files with the name:
a.svy.txt
b.svy.txt
.
.
.
xxx.svy.txt
How to read all of them but not use
add files file="a.svy.txt"
/file="b.svy.txt"
...
can I read all of them one time like
data list file='*.svy.txt' or some other technique?
Thanks a lot!
j*****i
发帖数: 47
2
请教一下:如何用Stata和SAS从weighted data里面随机抽取几个样本?
数据:weighted US census data (weight: perwt,即person weight).
我想在这个数据中随机有放回地抽取n个人。
简化一下,就是,比如我们有一个data set, 里面只有两个变量,age and perwt。每
一个observation,代表了那个年龄组里的所有的人。
现在,我想随机从这个数据中抽取10个人,不是10个observation.
请问,Stata和SAS的相关命令是什么?
Stata中,有一个类似的命令bsample 10。但是没有相关的option可以设定原数据中的
weight,倒是有一个option是用来设定输出数据中的weight.
我也想过用svyset,但是我试了
svyset [iweight=perwt]
svy: bsample 10
显示的是:
svyset [iweight=perwt]
iweight: perwt
VCE: linearized
Single unit: mis... 阅读全帖
f*******r
发帖数: 257
3
来自主题: Economics版 - two step Heckman 的一个问题
Check out "svy: heckman". Frankly, I don't see your algorithm generates
consistent estimator. svy: heckman is build-in Stata command, should be
consistent.
H****g
发帖数: 2273
4
来自主题: Statistics版 - 着急请教stata高手。
这个可以做的,很多command都支持,不过麻烦的是不同的command要求的weight有时不
太一样。
也可以试试svy,楼主自己help svy试试,这个也许方便一点。
C*****1
发帖数: 185
5
来自主题: Economics版 - two step Heckman 的一个问题
Thanks for responding.
I checked svy: heckman, but it can not be applied to two-step procedure.
f*******r
发帖数: 257
6
来自主题: Economics版 - two step Heckman 的一个问题
I think there is a misconception. You don't need the Heckman two-step
estimator per se. Heckman model usually refers to the model which adjust
for selection bias or selectivity. There is so called Heckman two-step
estimator which is one way to estimate the model, but not the only one. In
fact, maximum-likelihood estimator is more efficient. I have not used it;
but I think svy: heckman is a ML estimator which allows for sampling weight.
It does not do Heckman's two-step estimator for a rea
(共0页)