# Retrieve random effects from an instrumented RE model

I am writing my term paper and I feel a demand to retrieve the individual effects from a Random Effects Instrumented Model (due to the usage of lags of regressors as the instruments, the panel is unbalanced).

I found the ranef() function in plm package, and according to its source code, it utilises the estimate of variance ratio theta coefficient $$\hat{\theta} = \sqrt{1 - \frac{\sigma^2_\varepsilon}{\sigma^2_{\varepsilon} +T \cdot \sigma^2_u}}$$, the mean residuals $$\bar{w}_{i}$$ which are gotten from total residuals $$\hat{w}_{it}$$ via between() function and finally the random effect is $$\hat{\gamma_{i}} = (1 - (1 - \theta)^2 )\cdot \bar{w}_i$$.

However, its current realisation prevents it from using it with Instrumentalised models (rendering "nested random effect models are not supported (yet?)").

Still, given the already IV-estimated RE-model, which passes the specification tests and its estimates are consistent, the identical actions seem to be feasible.

Shall identical actions be adequate in the instrumentation case (with Varadharajan-Krishnakumar transformation and error composites' variance estimation done by Swamy-Arora (1972) method)?

I further intend to find the correlations of retrieved random effects with extraneous regressors, which cannot be directly included in the model since its equation is theoretically predefined.

I understand that there is a feasible walkaround to retrieve the fixed effets from a correspondent Fixed Effects model, but I also have FE-inestimable fictive controls in the RE model and the scarcity of the data I have leaves concerns about efficiency of the estimates that I retrieve with FE within-model.

Any help would be much appreciated.

New contributor
Kornôg is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.