全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
11714 4
2008-08-30
<p>在下刚刚开始学习Stata,问一个比较比较粗浅的问题呀,Stata里面的in 命令的意思是什么呢?不是很能看懂。比如说下面这个句子</p><p>list urbrur in 1/10</p><p>然后,list urbrur if _n<10</p><p>说是和上面句子一样,为什么呢?_n代表什么呢?我用Help _n得到的结果看不懂呀。</p><p>知道这个论坛里面高手比较多,还希望各位大侠多多指点一下。</p><p></p>

[此贴子已经被作者于2008-8-30 0:10:35编辑过]

二维码

扫码加我 拉你入群

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

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

全部回复
2008-8-30 00:54:00

This question is about the "in" of Stata.

You must refer to http://www.stata.com/help.cgi?in.

They said "in at the end of a command means that the command is to use only the observations specified."

In your case, "list urbrur in 1/10" is to display the data of urbrur from 1(first data) to 10(tenth data).

And "_n" is the order of data. So if your first data is 123 and your tenth data 100,

list urbrur if _n=1

then display 123

list urbrur if _n=10

then display 100. So I think the correct command is "list urbrur if _n=<10".

Also "_N" is the maximum order of data. So if you have ten data in the above case, "_N" means 10.

I hope you get the answer and enjoy Stata's world.


eblog  金钱 +50  魅力 +10  经验 +25  奖励 2008-8-30 9:45:07
二维码

扫码加我 拉你入群

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

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

2008-8-30 08:20:00

in 1/10  表示第1到第10个样本

_n 是一个表示样本需要的标识,比如有100个观察值,那么对应的 _n 值就是 1,2,3..., 100.


eblog  金币 +1  金钱 +20  奖励 2008-8-30 9:45:56
二维码

扫码加我 拉你入群

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

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

2008-8-30 08:50:00
以下是引用jacosis在2008-8-30 0:05:00的发言:

在下刚刚开始学习Stata,问一个比较比较粗浅的问题呀,Stata里面的in 命令的意思是什么呢?不是很能看懂。比如说下面这个句子

list urbrur in 1/10

然后,list urbrur if _n<10

说是和上面句子一样,为什么呢?_n代表什么呢?我用Help _n得到的结果看不懂呀。

知道这个论坛里面高手比较多,还希望各位大侠多多指点一下。


把陈峰的书先看看,然后在学习别的。stata关键是一些最基础的命令。下面的链接你可以下载许多stata的书

https://bbs.pinggu.org/thread-188730-1-1.html

二维码

扫码加我 拉你入群

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

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

2008-8-30 10:12:00
Thanks a lot you guys, I really appreciate that.
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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