help xtsur-------------------------------------------------------------------------------

Title

xtsur-- One-way random effect estimation of seemingly-unrelated regressions (SUR) in unbalanced panel data set

SyntaxBasic syntax

xtsur (depvar1varlist1)(depvar2varlist2)...(depvarNvarlistN)[ifexp] [inrange] [,level(#)onestepmultisteptolerance(real1e-6)]Full syntax

xtsur([eqname1:]depvar1a[depvar1b...=]varlist1)([eqname2:]depvar2a[depvar2b...=]varlist2)...([eqnameN:]depvarNa[depvarNb...=]varlistN)[ifexp] [inrange] [,level(#)onestepmultisteptolerance(real 1e-6)]

Description

xtsurfits a many-equation seemingly-unrelated regression (SUR) model of they1variable on thex1variables and they2variable on thex1orx2variables and etc..., using random effect estimators in the context of unbalanced panel data. The approach for this command is based on constructing a multistep (stepwise) algorithm using Generalized Least Squares (GLS) and the Maximum Likelihood (ML) procedures. The method is originally developed by Erik Biorn (JoE).In order to run this command,

tssetmust be run to set the panel variable and time variable; see help tsset.Consider the system of G equation model:

y_git = x_git * b_g + u_git i=1,...,N; t=1,...,Ti; g=1,...,G u_git = v_gi + e_git,

where

v_gi are unobserved individual-level effects in the

gth equation;e_git are the observation-specific errors in the

gth equation;x_git is a vector of strictly exogenous covariates (ones dependent on neither current nor past e_git) in the

gth equation;b_g are vectors of parameters to be estimated in the

gth equation;Observations in the unbalanced data set are observed in at least one and at most P periods, and let N_p denotes the number of individuals observed in p periods, where p = 1,...,P. Hence, we can rearranged the unbalaned data set in the way that the N_1 individuals observed once come first, the N_2 individuals observed twice come second, N_3 individuals observed three times come third, and etc. In this way, we can consider the set of N_1 individuals as a cross section, and the sets of N_p individuals where p = 2,...,P as balanced panels.

For each

gth equation in the system, we can write the model as follows. Here, t is a sequence index, not a time index.y_git = x_git * b_g + v_gi + e_git i=1,...,N; t=1,...,Ti; g=1,...,G

Observations in the unbalanced panel are rearranged into P balanced panels. In each balanced panel, all observations are observed with the same number of periods. Therefore, the model can be rewritten for each p in P:

y_i(p) = x_i(p) * b + e_p # v_i + e_i(p)

where

e_p is vector of ones (p x 1); # is the Kronecker direct product.

Using the overall within-individual and between-individual covariation matrices, Biorn (2004) derived the unbiased estimators of sigma_v and sigma_e for each balanced panel. Using those estimated covariance matrices, the GLS problem is considered by minimizing the usual sandwich form with respect to parameter estimates. We then obtain the beta GLS estimator (bGLS_p) for the individuals observed p times. The overall GLS estimator can be shown to be the function of bGLS_p and their variances V(bGLS_p) for p = 1,...,P. Please see Biorn (2004) for details.

In order to get the efficient estimator of the SUR system, the multistep (stepwise) Maximum Likelihood estimation is implemented. The multistep is the problem of two sub-problems: (a) maximizing the log likelihood with respect to beta parameters for given sigma_v and sigma_e, which is the same as the GLS part above, and (b) maximizing the log likelihood with respect to sigma_v and sigma_e for given beta parameters. The multistep algorithm jointly solves (a) and (b), and it will stop until convergence of the overall estimates.

For details of the estimation procedures and simulations for this command,

xtsur, please refer to Minh Nguyen and Hoa Nguyen (2010).

Options

level(#)specifies the confidence level, in percent, for confidence intervals of the coefficients; see help level. The default is 95.

multistepimplements the multi-step algorithm where the estimated parameters are repeated until convergence from the multi-step ML and GLS procedures.

onestepimplements the one-step algorithm where an overall GLS estimate is obtained. The default method ismultistep.

tolerance(#)sets the convergence tolerance. The default tolerance is 1e-6.

Return valuesScalars

e(N)number of complete observations in unbalanced panel datae(T)maximum number of time periods observede(k_eq)number of equationse(N_g)number of unique units in groupse(g_min)minumum number of panelse(g_max)maximum number of panelse(tol)convergence tolerancee(cilevel)confidence interval levelMacros

e(cmd)name of the commande(cmdline)full command typede(method)estimation methode(title)title of regressione(version)version of the commande(properties)properties of estimatione(eqnames)equation namese(depvar)dependent variablese(exog)exogenous variablese(endog)endogenous variablese(tvar)time variablee(ivar)ID variableMatrices

e(b)estimated parameterse(V)variance-covariance of estimated parameterse(sigma_u)variance-covariance of random effectse(sigma_e)variance-covariance of error termsr(xtsur)structure of the unbalanced panel datasetFunctions

e(sample)sample used in estimation

ExamplesSUR model with 3 equations

. use example.dta, clear. xtsur (y1 x1 x2 x3 x4) (y2 x4 x6 x7) (y3 x7 x9). xtsur (y1 y2 y3 = x1 x2 x3 x4 x6 x7 x9), onestep. xtsur (y1 y2 = x1 x2 x3 x4 x6) (y3 x6 x7 x9)SUR model with 2 global equation names

. global eqn1 (y1 x1 x2 x3). global eqn2 (y2 x4 x6 x7). xtsur $eqn1 $eqn2

. xtsur (equname1: y1 x2 x3 x4) (equname2: y2 x3 x4)

. global eqn1 (equname1: y1 x2 x3 x4). global eqn2 (equname2: y2 x3 x4). xtsur $eqn1 $eqn2

ReferencesErik Biorn. 2004. Regression system for unbalanced panel data: a stepwise maximum likelihood procedure.

Journal of Econometrics122: 281-91. Minh Nguyen and Hoa Nguyen. 2010. Stata module: Estimation of system of regression equations with unbalanced panel data and random effects. Working Paper.

AcknowledgementsWe would like to thank numerous people for their comments and suggestions. Among them are Brian Poi, Kit Baum and one anonymous reviewer. We also thank all users who feedback had led to steady improvement in

xtsur.

AuthorMinh Cong Nguyen Enterprise Analysis Unit The World Bank, 2009 mnguyen3@worldbank.org

Hoa Bao Nguyen Ph.D. Candidate Economics Department Michigan State University East Lansing, MI Email: nguye147@msu.edu

VersionThis is version 1.0.4 released December 11, 2009.