全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
1060 2
2015-03-01
应该很简单的,统计了几千人的工作,工作类型有10来种。其中一个是miner(矿工)。现在要求生成一个新变量,凡是工作是矿工的定义为1,其他工作为0. 不知道我说的清不清楚。 原文是这样的From the variable describing the type of job of men (see point b above) and the type of jobs of the partners for women, generate two new variables. The first one, using the variable describing males’ job, called “miner” equals to 1 if the individual is a miner and 0 if he is doing any other type of job.  谢谢了。
二维码

扫码加我 拉你入群

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

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

全部回复
2015-3-1 03:29:05
gen miner=1 if (job==miner). 这是我的想法,不对但是为什么 错误提示是 miner not found。 这事数据文件,哪位大神帮忙看看
附件列表

Lesotho2004.dta

大小:1.52 MB

 马上下载

二维码

扫码加我 拉你入群

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

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

2015-3-1 08:17:52
hxj754700632 发表于 2015-3-1 03:29
gen miner=1 if (job==miner). 这是我的想法,不对但是为什么 错误提示是 miner not found。 这事数据文件, ...
miner只是job这个变量中的一个类别,所以你这么做提示这个错误很正常。你可以先定义一个新变量,将其命名为miner,然后再做你这条命令。
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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