OrthoPanels : An R Package for Estimating a Dynamic Panel Model with Fixed Effects Using the Orthogonal Reparameterization Approach

This article describes the R package OrthoPanels, which includes the function opm(). This function implements the orthogonal reparameterization approach recommended by Lancaster (2002) to estimate dynamic panel models with fixed effects (and optionally: wave specific intercepts). This article provides a statistical description of the orthogonal reparameterization approach, a demonstration of the package using real-world data, and simulations comparing the estimator to the known-to-be-biased OLS estimator and the commonly used GMM estimator.


Introduction
Panel data includes observations on N cases repeated over multiple, T > 1, time points (waves).A dynamic panel model is one that includes one or more lagged dependent variables.When fixed effects are included in such models, the OLS estimator is biased when T is fixed (small).This has become known as Nickell bias (Nickell, 1981).A maximum likelihood estimation of such a model leads to an incidental parameters problem (Neyman and Scott, 1948;Lancaster, 2000).Lancaster proposes an orthogonal reparameterization approach to produce a conditional likelihood estimator that is exact and consistent as N → ∞ for T ≥ 2 (Lancaster, 2002). 1his article provides an introduction to the R package OrthoPanels, which includes the function opm().This function implements the orthogonal reparameterization approach recommended by Lancaster (2002) to estimate dynamic panel models with fixed effects (and optionally: wave specific intercepts).In this article, we first provide a brief review of the methods implemented in OrthoPanels, and then discuss an empirical illustration using some of the features of the function opm().Finally, we conduct some Monte Carlo simulations to demonstrate the performance of the opm() function under different assumptions about the data generating process.

Review of methods
Panel models are used when we have observations on N cases repeated over T time points.These models allow us to account for unobservable individual effects (unobserved heterogeneity) that can neither be identified nor controlled with cross-sectional models (Finkel, 2008;Hsiao, 2014, pages 4-10).The most general approach to accounting for unobservable individual effects, in that it makes the fewest assumptions, is a fixed effects panel model (Hsiao, 2014, pages 47-56).
A dynamic panel model contains one or more lags of the dependent variable on the right-hand side.A dynamic model is necessary if the dependent variable is autoregressive (Arellano, 2003, page 129).We would expect a dependent variable to be autoregressive if we believe that subsequent to something happening that temporarily changes the value of the dependent variable (e.g., a temporary shift in an independent variable), the dependent variable will return partly but not entirely to its original value before the next observation.The consequence is that we have a dependent variable in which values that are above/below average at one observation are more likely than not to be above/below average at the next observation.This autoregressive relationship between current and past values of the dependent variable is not due to an omitted variable that links current and past values and not due to correlation between the current and past values of the errors.The autoregressive relationship is due to past values of the dependent variable having a direct effect on current values (Finkel, 2008, page 486).A simple example of a data generating process that might require a dynamic model with fixed effects (and wave specific intercepts) is: (1) where i = 1, ...N and t = 1, ..., T; y it is the value of the dependent variable y for case i at time t; x it is the value of the independent variable x for case i at time t; and ρ and β are parameters.The process is first order autoregressive with one lag of the dependent variable on the right-hand side.For each case, there is a case-specific fixed effect η i , also known as unobservable individual effects.These represent (over time) average differences between cases.There may also be over time changes in the average value of y it across cases, τ t .These are changes common to all cases at a particular point in time and include trending as a special case.The following discussion holds whether or not τ t are included.They are a useful control for dynamics like trending and global wave effects but need not be included if such dynamics do not exist in the data.
The estimation of (1) presents a challenge.The OLS fixed-effects estimator with a lag dependent variable is biased with a fixed (small) T. In the analysis of econometric panel data this has become known as Nickell bias.Nickell (1981) provided the analytical expressions of the bias that had been previously well documented by Monte Carlo work (Nerlove, 1967(Nerlove, , 1971)).Nickell showed that if the autoregressive parameter, ρ in (1), is positive, the bias will be negative.He also demonstrated that this bias persists even as ρ goes to zero.As we will see, the bias in the estimation of the autoregressive parameter has important biasing effects on the estimation of the short and long-run effects (Greene, 2012, pages 422-423) of dynamic variables (e.g., x it ).
A popular alternative to the OLS estimation is the Anderson and Hsiao (1981) instrumental variable approach and more generally the Arellano and Bond GMM estimator (1991), and other GMM estimators (Arellano and Bover, 1995;Blundell et al., 2000).The downside of these estimators is that they are inefficient (Behr, 2003).Further, the GMM approach uses approximate inference methods and requires assumptions about the appropriateness of past values of the dependent variable (and possibly independent variables) as instruments.These assumptions may or may not be valid.Lancaster (2000) argues the GMM estimator contains no data or information that is not already contained in the likelihood for the model.Hsiao et al. (2002) propose a transformed-likelihood approach to dealing with the incidental parameters problem.Lancaster (2002) proposes a conditional likelihood estimator (also a type of transformed-likelihood approach) that can analytically compute the conditional probability distributions, over our variables of interest, exactly.Such likelihood-based estimators require no instrumental variable assumptions.We refer to the approach suggested by Lancaster as orthogonal reparameterization (or OPM for orthogonalized panel model).This approach can be conceived of as a Bayesian version of the frequentist, transformed-likelihood approach proposed and tested by Hsiao, Pesaran and Tahmiscioglu (2002).See (Pesaran, 2015, pages 692-695) and (Hsiao, 2014, pages 80-135) for a review of likelihood-based methods developed to estimate linear dynamic panel models with fixed effects.The transformed-likelihood approach has been shown to perform better than GMM estimators (Hsiao, 2014;Hsiao et al., 2002), particularly when the autoregressive parameter is close to 1.The advantage of the OPM approach, over the transformed-likelihood estimators proposed by Hsiao et al. (2002) is that the latter requires knowing the appropriate assumptions regarding the initial conditions for y it at t = 0 and their relationship with the unobservable individual effects.This is often not known and if the wrong assumptions are made, the estimator is no longer consistent (Anderson and Hsiao, 1981;Hsiao, 2014, pages 86-98).This is not a requirement of the OPM approach.

The orthogonal reparameterization (OPM) approach
The Lancaster likelihood-based estimator proceeds as follows.The maximum likelihood estimation of model (1) with a fixed (small) T leads to an incidental parameters problem.Maximum likelihood estimation is consistent as N increases relative to the number of parameters estimated.With fixed T, the number of fixed-effects (η i ) approaches infinity at the same rate as N → ∞.In other words, each time we add a case, we add a parameter to be estimated.Therefore, N relative to the number of parameters cannot increase and we cannot rely on asymptotics as N → ∞ and the application of maximum likelihood leads to inconsistent estimates.Lancaster (2002) suggested a solution to this particular incidental parameters problem.
The key to this approach is that we are not actually interested in estimates of the incidental parameters (η i ).We are interested in estimates of the "common parameters" -in (1) this is the effect of dynamic variable x it (β 1 ), and τ t , ρ, and σ 2 .Therefore, we seek a reparameterization of the incidental parameters so that the incidental and common parameters are information orthogonal.This puts us in a position to produce an N → ∞ consistent likelihood-based estimate of the parameters of interest that is independent of the values of the incidental parameters.Therefore, we continue to have incidental parameters but not an incidental parameter problem.
A straightforward example of the OPM approach (Lancaster, 2002) is as follows.We wish to estimate a model that includes parameters η i , τ t , ρ and β 1 and error variance σ 2 -where η i represents the fixed effects, τ t represents wave specific effects, ρ is the first order autoregressive parameter and β 1 represents the effect of dynamic variable x it .We denote the likelihood function for the data for a The R Journal Vol.9/1, June 2017 ISSN 2073-4859 single case as i (η i , τ t , ρ, β 1 , σ2 ).Suppose the fixed effects can be reparameterized so that the likelihood function for the data for a single case factors as: Where i1 and i2 are themselves likelihood functions.If the parameters (η i ) and (τ t , ρ, β 1 , σ 2 ) are also variation independent, they are orthogonal.If ∏ i2 is the product of the i2 for all observations, it can then be shown that the application of maximum likelihood to ∏ i2 produces consistent estimates of (τ t , ρ, β 1 , σ 2 ) (Lancaster, 2002) as N → ∞ for any T ≥ 2.
Not all likelihoods can be transformed so that the incidental parameters are orthogonalized.However, a solution with an equivalent intuition may be available.It may be possible to reparameterize the fixed effects so that they are information orthogonal.If we denote the log of the likelihood for the data for observation i as L i , then the fixed effects are information orthogonal to a parameter (e.g., β 1 ) if the following condition is met: This can be interpreted as meaning that the slope of the log likelihood with respect to η i is independent of the slope of the log likelihood with respect to β 1 .If a transformation of the fixed effects can be found that meets this condition (and the equivalent condition for the other parameters -in this case τ t , ρ and σ 2 ), it may be possible to place priors on the parameters and integrate out the fixed effects.Specifically, we use flat priors for the η i and the remaining parameters.This is essentially a Bayesian estimation technique.This gives us the marginal posterior for the remaining parameters.Lancaster (2002) demonstrates how this can be done for the lagged dependent variable model with fixed effects.
Once we have the marginal posterior for our parameters of interest, we can use Monte Carlo methods to sample values from the marginal posterior to produce estimates and credible intervals for the parameters, as follows.We wish to estimate (1).To generalize a little, let us allow for K dynamic variables, so that βX i,t = ∑ K k=1 β k x i,t,k .To simplify the notation, we express X i,t , y i,t and y i,t−1 in vector terms X i , y i and y i− .As the τ t are optional, depending on the data generating process, we leave them out of the following discussion.The appropriate reparameterization of the fixed effects, forming uniform priors on ρ, β 1 , σ 2 , and {η i }, and integrating out the fixed effects results in the following posterior density function 2 : ) where H is defined as an operator that subtracts the mean.For example, if Sampling from this posterior (4) gives us estimates (distributions) for ρ, β and σ 2 .To do this we begin by integrating β out of (4).This gives us the following joint posterior density: Next, we integrate out σ 2 from (5) giving us the marginal posterior density: We can now proceed to sample triplet values (ρ, β, 1/σ 2 ) by: first sampling ρ from (6); then, given ρ, sample 1/σ 2 from (5); then given ρ and 1/σ 2 , sample β from (4).When we sample values of 1/σ 2 from (5) given ρ, we are sampling from a gamma distribution.When we sample values of β from (4) given ρ and 1/σ 2 , we are sampling from a multivariate normal.The medians of the sampled values give us our parameter estimates and the 2.5 and 97.5 percentiles give us our 95 percent credible intervals.
The limitation of this approach is that it must be worked out for each family of models.For example, the necessary reparameterization will differ for a panel probit model.Lancaster (2000) provides reparameterizations for Poisson count models, static linear panel models and dynamic (stationary and nonstationary) linear panel models.Estimates of dynamic, binary models by this approach are still in their early days (é and Kyriazidou, 2000;Arellano and Bonhomme, 2009).The approach relies on the Bayesian idea of integrating out the fixed effects to give us the marginal posterior distribution for the remaining parameters -although, this has many similarities to the frequentist idea of a conditional likelihood (Cox and Reid, 1987).For a review and comparison of these approaches, see Lancaster (2000).

The OrthoPanels package: empirical example
In this section, we demonstrate the use of the OrthoPanels package with an empirical example. 3The data we will use is from the 2010 British Election Study, using 3 waves of panel survey data with 1845 respondents.Our dependent variable is government approval.The wording of the survey question that produced the variable is: "On a scale that runs from 0 to 10, where 0 means strongly dislike and 10 means strongly like, how do you feel about the Labour Party?" Response categories were from 0 'Strongly dislike' to 10 'Strongly like', and 'Don't Know'.Independent variables (x it ) included in the model are: 1. Evaluations of the leaders of the Conservative, Liberal Democrat and Labour parties, measured using the question: "On a scale that runs from 0 to 10, where 0 means strongly dislike and 10 means strongly like, how do you feel about (David Cameron/Nick Clegg/Gordon Brown)?" '0<Strongly dislike'; '10>Strongly like'; 'Don't Know'.
2. A standard retrospective assessment of the national economic situation, or 'sociotropic' evaluation, using the question: "How do you think the general economic situation in this country has changed over the last 12 months?Has it:" Response options are: 'got a lot worse' (1); 'got a little worse' (2); 'stayed the same' (3); 'got a little better' (4); 'got a lot better' (5); 'Don't Know'.
4. A measure of the respondent's ideology based on preference for increasing or cutting taxes, using the question: "Using the 0 to 10 scale below, where the end marked 0 means that government should cut taxes a lot and spend much less on health and social services, and the end marked 10 means that government should raise taxes a lot and spend much more on health and social services, where would you place yourself on this scale?"'0<Government should cut taxes a lot and spend much less on health and social services'; '10>Government should increase taxes a lot and spend much more on health and social services'; 'Don't Know'.
5. And a measure of whether the respondent identifies with the governing Labour party, using the question: "Generally speaking, do you think of yourself as Labour, Conservative, Liberal Democrat or what?"This is recoded 1 for Labour and 0 otherwise.
For each variable, a 'Don't know' response was identified as missing and the corresponding case was deleted.Note though that OrthoPanels can accomodate unbalanced panel data under the assumption that the data is missing at random.

Data structure
The variables for the model to be estimated can be contained in a frame, list, or environment and the model can be specified symbolically with a formula as described below.
The variables for our empirical example are included in the data frame BES_panel.This data frame is included with the OrthoPanels package.
> head(BES_panel) n t Econ Clegg Brown Cameron Approve NHS Terror PID Tax 1 1 1 3 0 9 0 7 0 0 1 6 3 We include a second empirical example in Appendix 1. 4 The terrorism question in 2010 is replaced with a handling of the war in Afghanistan question.
The R Journal Vol.9/1, June 2017 ISSN 2073-4859 2 2 1 4 0 10 0 8 0 0 1 8 3 3 1 3 0 5 4 7 0 0 0 6 4 4 1 2 0 7 3 4 0 0 1 6 5 5 1 2 0 0 0 0 0 0 0 5 6 6 1 2 0 7 0 8 0 0 1 4 In this data frame, "Econ" refers to evaluations of the national economy; "Clegg" refers to evaluations of the Liberal Democrat leader; "Brown" refers to evaluations of the Labour leader; "Cameron" refers to evaluations of the Conservative leader; "Approval" refers to government approval; "NHS" refers to evaluations on how the government has handled the NHS; "Terror" refers to evaluations on how the government has handled terrorism; "PID" refers to whether the individual identifies as Labour; and "Tax" refers to the respondent's ideology based on their preference for cutting taxes.In addition to the variables, the data frame contains the vectors "n" and "t" indicating the case number and wave for each observation.If the independent and dependent variables are contained in 3-and 2-dimension arrays, these vectors are unnecessary because the index is implicit in the organization of the arrays.

Interface
We begin by specifying our model using a formula, indicating the data to be used, and the case and time variables: > BES.opm.model<-opm(Approve~Econ + Clegg + Brown + Cameron + NHS + Terror + PID + Tax, data = BES_panel, index = c( n , t ), n.samp = 10000, add.time.indicators= TRUE) The first argument is a formula specifying the model symbolically: response ∼ term1 + term2.This is consistent with the lm() function.It is not necessary to include the lagged dependent variable or the fixed effects in the model specification.This is done automatically.
The other arguments are: data which specifies the data frame, list or environment containing the variables in the model; n.samp which specifies the number of Monte Carlo iterations to use to estimate the parameters; index which is a two-element vector containing the names of the case and time variables, respectively; and add.time.indicators which is a logical argument.If the add.time.indicators is TRUE, the model includes dummy variables for each wave (time point).The default is FALSE.The data and index arguments are optional.If data is not specified, the variables are taken from the environment from which opm() is called.If index is not specified, the first two vectors are assumed to be the case and time indices, respectively.An additional optional argument is subset.This is a vector specifying a subset of observations to be used in the estimation.
The function opm() returns an object of class "opm" which includes a list, samples, with the following elements: "rho", a vector of n.samp parameter samples of ρ; "v", a vector of n.samp parameter samples of σ 2 ; and "beta", a n.samp by x variable matrix of parameter samples of β.If included in the model, the parameters for the time dummies are included in this matrix.The summary of the object provides us with the median, 68% equal tailed credible intervals and 95% equal tailed credible intervals for each parameter.The function caterplot() creates side-by-side plots of credible intervals of the opm model parameters.The intervals are displayed as horizontal lines, with the 90% interval using a thicker line width and the 95% interval a thinner one.The posterior median is indicated with a dot.

caterplot(BES.opm.model) abline(v=0)
We can use the function plot() to obtain the posterior density of each parameter.

plot(BES.opm.model, "rho")
In a dynamic model, the β coefficients are the immediate effects of a change in each of the covariates.This is known as the short-run effect.However, in a dynamic model, the short-run effect is not the full effect of a change in a covariate.As the future value of the dependent variable depends on the current value, the effect of a change in a covariate has a knock on effect into the future.Assuming a stationary The R Journal Vol.9/1, June 2017 ISSN 2073-4859 process, the effects asymptotically declined to zero over time.The cumulation of all these effects is known as the long-run effect and is estimated as β/(1 − ρ), where ρ is the autoregressive parameter (Wooldridge, 2013;Pickup, 2014).We can calculate the median and 95% equal tailed credible intervals for the long-run effects from the parameter samples.For example, for the first independent variable (the economy): > quantile(BES.opm.model$samples$beta[,1] / (1 -BES.opm.model$samples$rho),+ probs = c(0.025,0.5, 0.975)) 2.5% 50% 97.5% -0.04723233 0.05098789 0.15025695

The opm() function: Monte Carlo simulations
To demonstrate the performance of the OPM estimator operationalized by the opm() function, we use it to estimate models from simulated data with a known data generating process. 5We use the following data generating process to generate our simulated data sets: We use β = 0.50 and we generate data sets with two values for ρ (0.5 and 0.9).The unobserved fixed values η i , are generated from a uniform distribution: U(−1, 1).Note that both the y it and x it are a function of the fixed effects, with x it containing 75 percent of the fixed effect for y it .As a consequence, it is necessary to account for the η i in our data model in order to get an unbiased estimate of β and ρ. 6We generate panel data sets with an N of 1000 and a T of 2, 3, 4, and 9.A T of 2 means we collected three waves of data but we lose the first wave in order to have a measure of the lagged dependent variable in the second wave.This effectively means we have 2 waves of data for the purposes of estimation.This is as small of a T as we can get and still estimate a dynamic model.We generate 1000 data sets for each value of T and ρ.
Table 1, panels A through D, report the results of the simulations when the autoregressive parameter, ρ, is 0.9.This is a 'close to worst case scenario' in that the autoregressive parameter is very high.This is when Nickell bias and the incidental parameters problem will be at their worst.However, the autoregressive parameter is not so high that we have to begin worrying about issues of near integrated data.The tables present the results when the number of waves of data available is 3, 4, 5 and 10 respectively (i.e., T of 2, 3, 4, and 9).
The table reports the average value estimated for the autoregressive parameter (ρ), the β and the long-run effect.This is an indication of how accurate the estimator is on average.The tables also include the median value estimated for the long-run effect, for reasons described later.The tables include the proportion of estimates in which the true value for each parameter is included in the 95 percent confidence/credible interval (the coverage probability).This is an indicator of how useful the estimator is for hypothesis testing.Finally, tables report the root mean squared error for each parameter.This is an indication of how far off the true value the estimator will be on average.If an estimator is on average correct but could, for any given estimation, produce estimates far off the true value, its functionality is greatly diminished.
In addition to presenting the results for the opm() function (denoted OPM), the tables also present the results from an OLS fixed effects estimation and from a GMM estimation (Blundell and Bond, 1998;Arellano and Bover, 1995).The OLS fixed effects results demonstrate the estimation bias that the OPM estimator is designed to rectify.It is also a commonly used estimator for this type of panel data, despite the known bias (Nickell, 1981).The GMM approach is probably the most commonly used alternative and appears to be the next best performing estimator compared to likelihood-based estimators (Hsiao et al., 2002).There are a number of variations on the GMM approach (Croissant and Millo, 2008).We used a difference GMM with a two-step estimator.We use the available lags of the dependent variable as instruments.This specification was chosen as it seemed to produce the best results given our data generating process.We used the plm package to produce the GMM estimates (Croissant and Millo, 2008).This is a very versatile package for estimating panel models within R.
Beginning with a T of 2 (Table 1, Panel A), we can see just how badly biased the OLS fixed effects estimates are.With true values ρ = 0.9, β = 0.5 and LR effect of 5.The OLS estimator produces, on average, values of ρ = 0.59, β = 0.42 and LR effect of 1.05.The bias is substantial for all parameters.Partly as a result of these very large biases, this approach virtually never produces 95 percent confidence intervals that include the true values of the parameters.The root mean squared errors are particularly large for the long-run effects and ρ.Clearly, this approach is not appropriate under these circumstances.
When we look at the results for the OPM and GMM approaches (again with T = 2), both look very good for the average estimates of ρ and β.There is essentially no bias for either.The 95 percent confidence intervals include the true values around 95 percent of the time and the root mean squared errors are generally small, although the root mean squared error for rho is 83 percent smaller for the OPM approach.When we look at the results for the long-run effects, the two approaches diverge.Using the average estimate of the long-run effect as a measure of performance, the OPM estimator overestimates the long-run effect with a bias of 0.89, while the GMM estimator underestimates the long-run effect with a bias of 3.02.Further, while the 95 percent confidence intervals of the OPM estimator include the true value about 92 percent of the time, the GMM confidence intervals only include the true value about 72 percent of the time.
It may seem curious that the GMM estimator is so poor at estimating the long-run effect, when, on average, it is good at estimating ρ and β -especially since the long-run effect is simply a function of ρ and β: β/(1 − ρ).The problem occurs because of the reasonable but slightly large root mean squared error on the estimates of ρ.With the true value of 0.9 for ρ, the root mean squared error of the GMM estimates means it sometimes produces values very close to 1 for ρ.The division of 1 − ρ in the calculation of the long-run effect means that such values for ρ can translate into large errors in the estimate of the long-run effect. 7Because of a smaller root mean squared error, the OPM estimator suffers far less from this problem.
It must be noted then that for the reasons just discussed the mean estimate is not a very stable measure of the performance of the GMM estimates of the long-run effect.For the GMM estimator, under these circumstances, small differences in the estimates of ρ produce large differences in the average estimate of the long-run effect.A more stable measure is the median estimated long-run effect.For the GMM approach this is closer to the true value (2.21).However, the median OPM estimate is much better (5.17).Further, while the median GMM estimate is better than the mean GMM estimate, it does not change the fact that in any given application of the estimator, a very large error in the long-run effect can occur.This is the story of the root mean squared error for the long-run effect.These are moderate for the OPM estimator, 2.79, but extremely problematic for the GMM estimator: 36.57.This last result is worse than that for the OLS estimator.As we will see, when the true value of ρ is smaller or T is bigger, these problems are not so great but when T is very small and ρ is close to 1, the OPM estimator has the advantage of avoiding these large errors to a much greater degree.
As T increases to 3 and then 4 (Table 1, Panels B & C), the OLS fixed effects estimator continues to exhibit substantial biases and confidence intervals that are essentially useless for hypothesis testing.The OPM and GMM approaches continue to produce good estimates of ρ and β.As for the long-run effects, the OPM approach improves quickly, while the GMM approach continues to suffer from large root mean squared errors.By the time T increases to 9 (Table 1, Panel D), however, both the OPM and GMM approaches are performing well for all parameters and the OLS approach continues to perform poorly.
Table 1, Panels E & F, present the results with a reduced ρ of 0.5.With a smaller ρ, we would expect less extreme estimation problems.Unfortunately, the OLS fixed effects estimator continues to perform badly at very small values of T. The GMM and OPM estimators, on the other hand, perform very well for all parameters.The only real distinction is that the OPM estimator performs a little better, in terms of the root mean squared error, than the GMM estimator in the estimation of the long-run effect when T is at its smallest possible value of 2.
Overall, the simulations demonstrate that under the conditions considered (specifically a low T with a large N), the OLS fixed effects estimator exhibits considerable bias for all parameters.The GMM estimator is a large improvement on OLS with fixed effects but the OPM estimator consistently performs as well as or better.The superiority of the OPM results is in the estimation of the long-run effects when T is very small and ρ is close to 1, which appears to be the primary weakness of the GMM estimator.
Beyond the poor estimates for the long-run effect under specific conditions, we have also indicated that one of the downsides of GMM estimators is the need to make assumptions about the appropriateness of instrumental variables.Up to this point, we have been using lagged levels of the 7 One should always be cautious whenever the estimate of ρ is close to 1.This suggests that either a poor estimation has occurred or that the data is (near) integrated and therefore not stationary, for the purposes of estimation.

Appendix 1
As a second empirical example, we model the dynamics of labour demand of firm i in the United Kingdom in year t as a function of real product wages, gross capital stock and industry output.This is done using the data used by Arellano and Bond (1991).The variables for our second empirical example are included in the data frame 'abond_panel'.This dataframe is included with the OrthoPanels package.
We estimate the following: > abond.opm.model<-opm(n ~w + l_w + k + l_k + l2_k + ys + l_ys + l2_ys + yr1980 + yr1981 + yr1982 + yr1983 + yr1984, data = abond_panel, index = c( id , year ), n.samp = 10000, add.time.indicators= FALSE) where n is the log of employment in firm i at time t; w is the log of the real product wage; k is the log of the gross capital stock; and ys is the log of the gross industry output.beta.wsig2 rho q q q q q q q q q q q q q q q 0.45 0.50 0.55 The R Journal Vol.9/1, June 2017 ISSN 2073-4859

>
summary(BES.opm.model)Call: opm(x = Approve ~Econ + Clegg + Brown + Cameron + NHS + Terror + PID + Tax, data = BES_panel, index = c("n", "t"), n.samp = 10000, add.time.indicators= TRUE) We create side-by-side plots of credible intervals of the OPM model parameters.The intervals are displayed as horizontal lines, with the 90% interval using a thicker line width and the 95% interval a thinner one.The posterior median is indicated with a dot.