*! version 1.0 Jan 2015
help itercenter (SJ15-3: st0409)

Title

itercenter -- Demean variables with respect to multiple categorical variables

Syntax

itercenter varlist [if] [in] [weight], fe(fe_varlist) [options]

* fe(fe_varlist) specify the list of variables used for the iterative demeaning process; must include at least one categorical variable

tolerance(#) specify the convergence criteria; default is epsfloat()

maxiter(#) specify the maximum number of iterations allowed; default is maxiter(10000)

mean calculate mean in transformed data

replace replace the original variable with the transformed data

xfe(str) create a new variable with the transformed data

* fe() is required.

aweights, fweights, iweights are allowed; see weight.

Description

itercenter implements an iterative demeaning process of all variables in
varlist with respect to the variables declared in the fe() option. The
transformed variable is stored in double format, and it substitutes the
current one. If the mean option is specified, the transformed variable
will preserve the overall mean (this is the
default option when using regxfe).

Options

fe(fe_varlist) specifies the categorical variables used for the iterative demeaning
process. The user must include at least one categorical
variable to proceed with demeaning transformation. fe() is required.

tolerance(#) specifies the convergence criteria to be used to
transform variables. Using low tolerance levels can slow down the processing
time but increase the accuracy of the estimates. The default is
epsfloat().

maxiter(#) specifies the maximum number of iterations allowed. If
convergence is not achieved, a small number of iterations reduce the accuracy
of the results. The default is maxiter(10000).

mean specifies to calculate the mean in the transformed data and
preserve the overall mean. This is the default option for regxfe.

replace specifies to replace an existing variable with the same name
with the transformed data. This cannot be used in combination with
xfe(str), but one option must be selected.

xfe(str) specifies to create a new variable with the transformed
data using the indicated prefix for the new variable name. Original variables are
kept in the dataset. This cannot be used in combination with replace, but one
option must be selected.

Remarks

The program uses the command center.

Examples

. webuse nlswork

. itercenter ln_wage age grade union, fe(ind_code occ_code idcode year) replace

. itercenter ln_wage age grade union, fe(ind_code occ_code idcode year) mean xfe(d)

Author

Fernando Rios-Avila

Levy Economics Institute of Bard College

Blithewood-Bard College

Annandale-on-Hudson, NY

friosavi@levy.org

Also see

Article: Stata Journal, volume 15, number 3: st0409