*! version 1.0.1 28sep2019

Title

xtss -- Maximum likelihood estimator of panel data (S,s) rule regression models

Syntax

xtss
depvar
[indepvars]
[if] [in]
[, options]

Model
thold(varlist) include varlist in the threshold equations

diff allow the thresholds to differ

re include a random effect in the model for depvar

noconstant suppress constant term

Reporting
level(#) set confidence level; default is level(95)

display_options display options for the regression output

Integration
intpoints(#) use # quadrature points;
default is intpoints(12)

Maximization
initvals(numlist) set numlist as the initial values for the coefficients

A panel variable and a time variable must be specified using xtset

Description

xtss estimates the parameters of a linear latent variable model, where the observed
outcome remains unchanged from the previous period, if the difference relative to the current value of the latent variable
is within stochastic (S,s) thresholds. The upper-S and lower-s thresholds are normally distributed
and truncated at zero and can depend on time-varying covariates. This estimator is based on Fougere et
al (2010) and Dhyne et al (2011) who study price rigidity.

Options

Model

thold(varlist) allows the mean parameter mu(it) in the truncated normal distributions of the upper and lower (S,s) stochastic thresholds
be a linear function of panel and time-varying variables in varlist (see remarks). A constant is always included.

diff lets the upper and lower stochastic thresholds have different mean parameters. The default is they are the same.

re requests that the latent variable model for depvar include a random effect on the constant to control for time-invariant unobserved heterogeneity.

noconstant suppresses the constant term in the latent variable model for depvar.

Reporting

level(#) specifies the confidence level, as a percentage, for confidence intervals. The default is level(95).

display_options:
noci,
nopvalues,
noomitted,
vsquish,
noemptycells,
baselevels,
allbaselevels,
nofvlabel,
fvwrap(#)
fvwrapon(style),
cformat(%fmt),
pformat(%fmt),
sformat(%fmt), and
nolstretch; see [R] estimation options.

Integration

intpoints(#) specifies the number of integration points # for the Gauss-Hermite quadrature method, which is used to
integrate out the random effects when re is specified. The default is intpoints(12).

Maximization

initvals(numlist) sets the initial values for the coefficients to be those in numlist. If this option is
not specified, the coefficients in the latent variable model are obtained by OLS or GLS and those in the threshold
mean equations by estimating a bivariate probit model.

Remarks

xtss is appropriate when an outcome variable y(it) exhibits infrequent changes due to adjustmen costs and is revised to a frictionless
latent outcome y(it)*, when the difference y(it)*-y(it-1)>S(it), or when y(it)*-y(it-1)<-s(it), where (S,s) are the upper and
lower bound stochastic thresholds. When the difference is within the thresholds, the value remains unchanged from the previous period y(it)=y(it-1).

The frictionless outcome model is: y(it)=x1(it)*b1+u(i)+e(it), where u(i)~iidn(0,sigma_u^2) is a random effect and e(it)~iidn(0,sigma_e^2) and
where the thresholds have normal distributions truncated at zero: S(it)~N+(mu_upper(it),sigma_c^2) and s(it)~N+(mu_lower(it),sigma_c^2).
xtss allows the mean parameters to depend on time-varying controls: mu_upper(it)=x2(it)*b2_upper and mu_lower(it)=x2(it)*b2_lower, where x2
can contain variables that are included in x1.

This model has been used in the literature to explain firm-level prices, which are revised periodically and where the thresholds (S,s)
measure the extent to which changes are costly and represent nominal rigidity.

Examples

The following examples use simulated data on quarterly prices for N=150 products between 2005Q1 and 2009Q4 setting sigma_e=sigma_c=sigma_u=0.1. The products
are produced by 3 manufacturers and frictionless prices are explained by observed material costs with a coefficient of 1, firm fixed effects and
unobserved product random effects. Firms collude from 2007Q1 and this leads to a rise of 0.2 in the log-frictionless price, a
reduction of -0.1 in the mean parameter of the upper threshold for a price rise and an increase of 0.1 in the mean parameter of the lower
threshold for a price fall.

Symetric thresholds

In this example, the thresholds are restricted to be symmetric and there are no random effects

Setup

. use stickyprices.dta

Estimate the model

. xtss ln_price i.firm ln_materials cartel, thold(cartel)

ML regression Number of obs = 2,850
Wald chi2(4) = 44751.23
Prob > chi2 = 0.0000
Log likelihood = -1065.8609

+

--------

ln_price | Coef. Std. Err. z P>|z| [95% Con f. Interval]

+

--------

Model |
firm |
firm2 | 1.014183 .0096412 105.19 0.000 .9952869 1.03308
firm3 | 1.00762 .0085368 118.03 0.000 .9908878 1.024351
|
ln_materials | .9902805 .035048 28.25 0.000 .9215876 1.058973
cartel | .2310741 .0362605 6.37 0.000 .1600048 .3021433
_cons | .9853571 .0081766 120.51 0.000 .9693312 1.001383

+

--------

Threshold |
cartel | .0579821 .0362217 1.60 0.109 -.0130112 .1289754
_cons | .0607266 .0955651 0.64 0.525 -.1265775 .2480307

+

--------

/lnsigma_c | -1.121018 .1908363 -5.87 0.000 -1.495051 -.7469861
/lnsigma_e | -1.998873 .0183306 -109.05 0.000 -2.0348 -1.962946

+

--------

sigma_c | .3259477 .0622027 .2242372 .4737924
sigma_e | .1354879 .0024836 .1307066 .1404441

+

--------

Asymetric time-varying thresholds and random effects

This example models the true DGP by allowing for asymmetric thresholds and random effects

. xtss ln_price i.firm ln_materials cartel, thold(cartel) diff re

ML random effects regression Number of obs = 2,850
Wald chi2(4) = 61668.13
Prob > chi2 = 0.0000
Log likelihood = -443.92154

+

--------

ln_price | Coef. Std. Err. z P>|z| [95% Con f. Interval]

+

--------

Model |
firm |
firm2 | .9753967 .0144508 67.50 0.000 .9470736 1.00372
firm3 | .9888122 .0145501 67.96 0.000 .9602945 1.01733
|
ln_materials | .9853875 .0252269 39.06 0.000 .9359438 1.034831
cartel | .2131089 .0260973 8.17 0.000 .1619591 .2642587
_cons | 1.015173 .0124511 81.53 0.000 .9907692 1.039577

+

--------

Lower_threshold |
cartel | .0958017 .0106609 8.99 0.000 .0749066 .1166967
_cons | .1918025 .0082502 23.25 0.000 .1756324 .2079726

+

--------

Upper_threshold |
cartel | -.0800436 .0122694 -6.52 0.000 -.1040912 -.0559959
_cons | .1924725 .0081926 23.49 0.000 .1764152 .2085298

+

--------

/lnsigma_c | -2.435955 .0620125 -39.28 0.000 -2.557498 -2.314413
/lnsigma_e | -2.319026 .0182523 -127.05 0.000 -2.3548 -2.283253
/lnsigma_u | -2.292 .0422122 -54.30 0.000 -2.374735 -2.209266

+

--------

sigma_c | .0875141 .005427 .0774984 .0988242
sigma_e | .0983693 .0017955 .0949125 .1019521
sigma_u | .1010641 .0042661 .0930392 .1097812

+

--------

Stored results

xtss stores the following in e():

Scalars

e(N) number of observations

e(N_g) number of groups

e(k_aux) number of auxiliary parameters

e(df_m) model degrees of freedom

e(ll) log likelihood

e(chi2) chi-squared

e(n_quad) number of quadrature points

Macros

e(cmd) xtss

e(cmdline) command as typed

e(depvar) name of dependent variable

e(ivar) variable denoting groups

e(tvar) variable denoting periods

e(title) title in estimation output

e(chi2type) Wald type of model chi-squared test

e(predict) program used to implement predict

Matrices

e(b) coefficient vector

e(V) variance-covariance matrix of the estimators

Functions

e(sample) marks estimation sample

Reference

Dhyne, E., C. Fuss, M. Pesaran and P. Sevestre. 2011.
Lumpy price adjustments. Journal of Business and Economic Statistics.

Fougere, D., E. Gautier, and H. L. Bihan. 2010.
Restaurant prices and the minimum wage. Journal of Money, Credit and Banking.

Author

This command was written by David Vincent (davidwvincent@hotmail.com).
Comments and suggestions are welcome.