Stata 15 help for xttab

[XT] xttab -- Tabulate xt data


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.



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


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


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).


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

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


Setup . webuse nlswork . xtset id year

xttab . xttab msp . xttab race

xttrans . xttrans msp . xttrans msp, freq

Stored results

xttab stores the following in r():

Scalars r(n) number of panels

Matrices r(results) results matrix

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index