help xtset2 v. 1.1 - 03. October 2020

Title

xtset2 - advanced routines for xtset and _xt.

Syntax

xtset2 [panelvar timevar] [if]
[,
checkvars(varlist)
matrix
showxtset
version
tsoptions]

panelvar is the panel identifier (cross-section) and timevar the time identifier.
xtset2 without the panel and time identifier displays the current setting.
tsoptions are options passed on to xtset.

Contents

Description

Options

About

Saved Values

Description

xtset2 extends xtset and tsset.
xtset2 checks if a panel is balanced with respect to the time, panel identifier and if
defined with resepect to non missings in a variablelist.
xtset2 was developed for xtdcce2.

Options

checkvars(varlist) defines the variables the sample is restricted to.
If a variable in varlist has a missing value, it is removed from the sample.

matrix saves a matrix with Panelid, T, Tmin, Tmax, Tbar and missings.

showxtset display output of xtset.

version returns version number.

tsoptionspasses further options to xtset.

Saved Values

xtdcce2 stores the following in r():

Scalars
r(N) number of observations
r(Tmax) maximum of time periods
r(Tmean) mean of time periods
r(Tmin) minimum of time periods
r(NumGaps) number of gaps
r(NumMissing) number of missings
r(balancedN) number of balanced cross-sections
r(N_g) number of groups

Macros
r(timevar) name of time identifer
r(panelvar) name of panel identifer
r(balanced) balanced

Matrices
r(PanelMatrix) table with details for each panel

Author

Jan Ditzen (Free University of Bozen-Bolzano)

Email: jan.ditzen@unibz.it

Web: www.jan.ditzen.net

Also see

See also: xtset, _xt, tsset