全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
3800 1
2016-01-24
今有以面板数据     hhid为农户代码,year为年,worker为务工状况(1为务工,0为非务工)

  

hhid

  

year



worker



10001



2009



1



10001



2011



0



10002



2009



0



10002



2011



1



10003



2009



1



10003



2011



1



10004



2009



0



10004



2011



0



10005



2009



0



10005



2011



1





求问怎么通过stata,计算转移矩阵?

转移矩阵


  
  

2011



2009



务工



非务工



务工



1



1



非务工



2



1




二维码

扫码加我 拉你入群

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

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

全部回复
2016-1-24 11:55:00
Title

    [XT] xttab -- Tabulate xt data


Syntax

        xttab varname [if]

        xttrans varname [if] [, freq]

    A panel variable must be specified; use xtset.
    by is allowed with xttab and xttrans; see [D] by.



Menu

    xttab

        Statistics > Longitudinal/panel data > Setup and utilities > Tabulate xt data

     xttrans

        Statistics > Longitudinal/panel data > Setup and utilities > Report transition probabilities


Description

    xttab, a generalization of tabulate oneway, performs one-way tabulations and decomposes counts into between and
    within components in panel data.

    xttrans, another generalization of tabulate oneway, reports transition probabilities (the change in one
    categorical variable over time).



Option

        +------+
    ----+ Main +-----------------------------------------------------------------------------------------------------

    freq, allowed with xttrans only, specifies that frequencies as well as transition probabilities be displayed.


Examples

    Setup
        . webuse nlswork
        . xtset id year

    xttab
        . xttab msp
        . xttab race

    xttrans
        . xttrans msp
        . xttrans msp, freq
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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