0% found this document useful (0 votes)
48 views

Code Stata

The document provides instructions for conducting panel data analysis in Stata. It includes commands to install packages for data management and output, encode identifiers, set panel data, perform summary statistics, correlations, random effects regression, fixed effects regression, and tests to select the preferred model. Results from the regressions and tests are stored and output tables are generated to report and compare the random effects and fixed effects models.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views

Code Stata

The document provides instructions for conducting panel data analysis in Stata. It includes commands to install packages for data management and output, encode identifiers, set panel data, perform summary statistics, correlations, random effects regression, fixed effects regression, and tests to select the preferred model. Results from the regressions and tests are stored and output tables are generated to report and compare the random effects and fixed effects models.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

ssc install winsor2

winsor2 Tocdotangtruong, replace cuts (5 95)

findit xttest3

findit xtserial

findit esttab
encode ID, gen(FIRM)
encode ID, gen(FIRM)

xtset FIRM YEAR

sum y x1 x2 …..

corr y x1 x2 …

xtreg y x1 x2 ….,re

est sto re

xtreg y x1 x2 ….,fe

est sto fe

hausman fe re

p-value<alpha  FEM

xttest3

xtserial y x1 x2 …

p-value>alpha  REM

xttest0

xtserial y x1 x2 …

xtgls y x1 x2 , panels(h) corr(ar1)

esttab fe re gls, star (* 0.1 ** 0.05 *** 0.001) brackets nogap


esttab fe re gls, star (* 0.1 ** 0.05 *** 0.001) brackets nogap

You might also like