levelsof variable,local (A)

levelsof 提取了variable下面每一个值,然后local把这些值统一在A的集合下面

. use tv1,clear

. des

Contains data from tv1.dta

Observations: 10

Variables: 6 28 Dec 2009 12:10

-----------------------------------------------------------------------------------

Variable Storage Display Value

name type format label Variable label

-----------------------------------------------------------------------------------

kidid float %5.0f ID

dt float %d date of observation

female float %6.0f is kid female?

wt float %4.0f weight of kid

tv float %4.0f tv watching (in hours)

vac float %4.0f is kid on vacation?

-----------------------------------------------------------------------------------

Sorted by:

. levelsof dt ,local(a)

15347 15348 15350 15351 15353 15356 15358 15359 15361 15362

. levelsof female ,local(b)

0 1

 

相关链接

评论可见,请评论后查看内容,谢谢!!!评论后请刷新页面。