Menu

Nonlinear panel-data models

Stata now fits nonlinear models with random effects. This means that when your science says that the model should be nonlinear in the parameters, as in the constant elasticity of substitution (CES) production function or in a growth curve for adoption of a new technology, you can now fit that model even when you have panel data. Parameters in the fixed portion of the model and random effects can both enter the model nonlinearly.

 Now instead of fitting a linear model with random effects UjUj, such as:

Linear with random effects

 we can fit a nonlinear model with random effects, such as:

 Nonlinear with random effects

The new menl command fits these models. In particular, an example with random intercepts is presented under Random intercepts. You can also fit models with random coefficients as shown in the Random coefficients and random-effects covariance structures example. You can even fit models with additional levels. See the Nonlinear three-level model: CES production function

Bayesian panel-data models

The new bayes prefix can fit Bayesian panel-data models. If you read Bayesian regression models using the bayes prefix, this may surprise you. But what you might have overlooked is that panel-data models can be fit using commands for multilevel models. You can read all about Bayesian multilevel models. But when you see:

Bayesian panel-data models

Instead think:

Bayesian panel-data models

which fits a panel-data linear regression model with random intercepts by id. Thus, while you can't fit the Bayesian version of this model by typing:

Bayesian panel-data models

you can type:

Bayesian panel-data models

And because you are using mixed, you are not limited to random intercepts. You can include random coefficients too. If the coefficient for x2 varies across ids, type:

Bayesian panel-data models

For an example, see Random coefficients.

Bayesian panel-data models are not only for continuous outcomes. You can just as easily type for binary outcomes

Bayesian panel-data models

for count outcomes:

Bayesian panel-data models

or for censored outcomes:

Bayesian panel-data models

Or use any of the 12 multilevel estimators that support the bayes prefix.

Panel-data interval regression with random coefficients

Suppose you have panel data and want to fit a random-effects model to an interval-measured outcome such as income bracket or age group.

If ylower and yupper record the upper and lower endpoints of the outcome, we could type:

Bayesian panel-data models

to fit a model with random intercepts by id. The xtintreg command is not new, but the meintreg command is. You can fit the same model with meintreg by typing:

Bayesian panel-data models

The advantage of using meintreg is that it does not restrict us to random intercepts. What if the coefficient for x1 varies across the levels of id? We can fit a random-coefficients model by typing:

Bayesian panel-data models

You can see an example and learn more about the new meintreg command. That example fits a model with city-level random intercepts.

Bayesian panel-data models

The model could easily be extended to allow for random coefficients on age and work by typing:

Bayesian panel-data models

Post your comment

Timberlake Consultants