楼主: cmj_0702
4414 8

[编程问题求助] 求教空格加点是什么意思 [推广有奖]

  • 5关注
  • 4粉丝

硕士生

55%

还不是VIP/贵宾

-

威望
0
论坛币
196 个
通用积分
0
学术水平
1 点
热心指数
1 点
信用等级
0 点
经验
3775 点
帖子
101
精华
0
在线时间
66 小时
注册时间
2012-3-13
最后登录
2014-5-12

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币

use http://www.stata-press.com/data/r8/womenwk, clear

generate d = 1

replace  d = 0 if wage == .

heckman wage educ age, select (married children educ age) twostep

heckman wage educ age, select (married children educ age) nolog

*heckman wage educ age, select (d = married children educ age) twostep nolog

*probit d  married children educ age, nolog

predict cndwage, ycond

summarize wage cndwage if wage < .

predict expwage, yexpected

gen wage0 = wage

replace wage0 = 0 if wage >= .

summarize wage0 expwage

这其中的三个空格加点是什么意思啊?都是空缺值或0的意思吗?
二维码

扫码加我 拉你入群

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

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

关键词:是什么意思 summarize Children generate Expected summarize children

回帖推荐

Bayesian.var 发表于2楼  查看完整内容

This answers your question, quoted from http://www.stata.com/help.cgi?missing replace d = 0 if wage == . * replace d to 0 if wage equals missing value summarize wage cndwage if wage < . * summarize wage and cndwage when the missing value of wage is excluded replace wage0 = 0 if wage >= . * replace wage0 to 0 if wage is missing Quote ...
沙发
Bayesian.var 发表于 2013-9-25 22:08:24 |只看作者 |坛友微信交流群
This answers your question, quoted from http://www.stata.com/help.cgi?missing

replace  d = 0 if wage == .                        
* replace d to 0 if wage equals missing value
summarize wage cndwage if wage < .            
* summarize wage and cndwage when the missing value of wage is excluded
replace wage0 = 0 if wage >= .
* replace wage0 to 0 if wage is missing
               
Quote :
*"        ., the default, which is called the "system missing value" or sysmiss


    and


        .a, .b, .c, ..., .z, which are called the "extended missing values".


    Numeric missing values are represented by large positive values.  The
    ordering is


                all nonmissing numbers < . < .a < .b < ... < .z


    Thus, the expression age > 60 is true if variable age is greater than 60
    or missing.


    To exclude missing values, ask whether the value is less than ".".  For
    instance,


        . list if age > 60 & age < .


    To specify missing values, ask whether the value is greater than or equal
    to ".".  For instance,


        . list if age >=.


    Stata has one string missing value, which is denoted by "" (blank).  "*
已有 2 人评分论坛币 学术水平 热心指数 信用等级 收起 理由
admin_kefu + 100 热心帮助其他会员
cmj_0702 + 1 + 1 + 1 分析的有道理

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

I use to type English as my computer in office room doesn't support Chinese.

使用道具

藤椅
cmj_0702 在职认证  发表于 2013-9-26 18:51:59 |只看作者 |坛友微信交流群
Bayesian.var 发表于 2013-9-25 22:08
This answers your question, quoted from http://www.stata.com/help.cgi?missing

replace  d = 0 if w ...
再问下这个大于号、小于号一般怎么区分使用呢?

使用道具

板凳
Bayesian.var 发表于 2013-9-26 20:16:59 |只看作者 |坛友微信交流群
大于和小于号就按正常的理解来区分,  >大于,<小于,>=大于或者等于,<=小于或者等于

在这里就把缺失值当做一个特例,一个无限足够大的数集,一个正常的数据所不能达到的水平,只有大于等于这个临界(.) 才是缺失值,小于就是正常观测值。
已有 1 人评分论坛币 热心指数 收起 理由
蓝色 + 60 + 1 热心帮助其他会员

总评分: 论坛币 + 60  热心指数 + 1   查看全部评分

I use to type English as my computer in office room doesn't support Chinese.

使用道具

报纸
cmj_0702 在职认证  发表于 2013-9-26 21:28:17 |只看作者 |坛友微信交流群
Bayesian.var 发表于 2013-9-26 20:16
大于和小于号就按正常的理解来区分,  >大于,=大于或者等于,
原来这样啊,差不多明白了,stata里的表示有点奇怪,谢谢了

使用道具

地板
蓝色 发表于 2013-9-26 21:51:32 |只看作者 |坛友微信交流群
这些就需要看manual里面介绍stata对缺失值的介绍和解释了

使用道具

7
cmj_0702 在职认证  发表于 2013-9-27 13:48:27 |只看作者 |坛友微信交流群
蓝色 发表于 2013-9-26 21:51
这些就需要看manual里面介绍stata对缺失值的介绍和解释了
自己英文看得很累,呵呵

使用道具

8
蓝色 发表于 2013-9-27 15:31:01 |只看作者 |坛友微信交流群
不看manual,是不行的
你现在这是最简单的问题,你都不看,遇到难的别人很难帮你解决

使用道具

9
sunnywu72 发表于 2013-9-28 00:30:11 |只看作者 |坛友微信交流群
cmj_0702 发表于 2013-9-26 21:28
原来这样啊,差不多明白了,stata里的表示有点奇怪,谢谢了
很多软件和数据格式都有自己缺失值的表示方式, 比如Excel 用9999(如果我没记错). Stata用这么多方式表达缺失值是因为有的时候需要区分缺失的原因。你这个属于入门Starter问题,最基本的manual里面都有解释。

使用道具

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

本版微信群
加好友,备注jltj
拉您入交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-5-22 12:00