Stata 15 help for xttab

[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

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