SWAMY—Random coefficients estimator in panel data

Use this forum to post complete RATS "procedures". Please be sure to include instructions on using the procedure and detailed references where applicable.
Post Reply
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

SWAMY—Random coefficients estimator in panel data

Post by TomDoan »

@SWAMY implements the Swamy random coefficients estimator from Swamy(1970), "Efficient Inference in a Random Coefficient Regression Model", Econometrica, vol 38, no 2, pp 311-323. @MEANGROUP is a similar procedure which does pooled mean group (equally-weighted) estimates.

Detailed description
behnam
Posts: 5
Joined: Sat Jul 25, 2015 5:52 am

Re: SWAMY-Random coefficients estimator in panel data

Post by behnam »

Hi TOM,
I am working in fixed effects panel data but this is a heteroskedastic panel with serial correlation.and i must estimate a homoskedastic without any correlation and i don't know exactly what should i do. in stata there is a code named xtgls that can solve this two problems jointly, is there any rats code like that? i try to do @swamy procedure but results are completely different with stata and serial correlation is still remaining.Could you kindly help me on this?
thanks in advance,
behnam
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: SWAMY-Random coefficients estimator in panel data

Post by TomDoan »

SWAMY is completely different from anything that xtgls does. AR1 corrections, whether in single equation or multiple equations/panel data are generally an indication that you have inadequately dealt with the dynamics of the model—there is almost always a better way to handle that using lags in the regressors.
behnam
Posts: 5
Joined: Sat Jul 25, 2015 5:52 am

Re: SWAMY-Random coefficients estimator in panel data

Post by behnam »

Dear tom,
thanks for your prompt answer,
what about heteroskedasticity? how i can solve this problem and get homoskedastic result?can adding lags solve heteroskedasticity or there isn"t relation between them?
shimarats
Posts: 31
Joined: Fri Feb 07, 2014 12:51 pm

Re: SWAMY—Random coefficients estimator in panel data

Post by shimarats »

hi tom.

my problem is same behnam problem . if i do swamy -random coefficients estimator in panel data. i am doing to model of panel and another pooled method. i find to two problem like hetroskedasticity and serial correlation .which coding can solve both these problems ? is it possible i used swamy code.? after solve these problems ,can i used by EGLS method that means after i solve these problem ,how i can to estimate the equation of panel data. thanks dear
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: SWAMY—Random coefficients estimator in panel data

Post by TomDoan »

As with the previous poster, the Swamy procedure has nothing to do with either heteroscedasticity or serial correlation. And, as with the previous poster, if you have serially correlated errors, fix the dynamics of the model. Slapping an AR correction on a poorly specified model has been considered bad form for at least 20 years.


Last bumped by TomDoan on Thu Apr 12, 2018 2:16 pm.
Post Reply