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

STATA Data Panel

This document provides instructions for analyzing panel data using Stata. It discusses how to: 1. Declare a dataset as panel data in Stata, specifying the time and panel ID variables. 2. Estimate fixed effect and random effects models for panel data regression. 3. Perform post-estimation tests like the Hausman test to compare the fixed and random effects models and the Breusch-Pagan LM test for random effects.

Uploaded by

albertoloss
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
357 views

STATA Data Panel

This document provides instructions for analyzing panel data using Stata. It discusses how to: 1. Declare a dataset as panel data in Stata, specifying the time and panel ID variables. 2. Estimate fixed effect and random effects models for panel data regression. 3. Perform post-estimation tests like the Hausman test to compare the fixed and random effects models and the Breusch-Pagan LM test for random effects.

Uploaded by

albertoloss
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

1

DATA PANEL

Aplikasi data panel menggunakan data Grunfeld.xls

Spesifikasi model :
Y = f(X2, X3)

dimana:
Y : gross investment
X2 : value of firm
X3 : capital




2
Entry data secara cut paste ke Stata




Diperlukan declare dataset sebagai data panel yang akan dikenal Stata.

Klik Statistics Cross-sectional time series Setup & utilities Declare dataset
to be cross-sectional time series





3

Stata akan memunculkan dialog box
Isi Time variable : year
Panel ID variable: firm
Klik radio button yearly, lalu OK



Pada Stata result window akan menunjukkan perintah yang telah dieksekusi.



Analisis individual variability
ketik:
xtsum variabel_dependen variabel_independen

4
Fixed Effect Model

Klik Statistics Cross-sectional time series (Generalized) linear models-Panel-
data linear regression



Dialog box xtreg akan muncul.
Isi dependent variable : y
Independent variable : x2 x3




5
Hasil estimasi fixed effect model :




Menyimpan hasil estimasi di memory komputer
(akan digunakan untuk hausman test)
Klik Statistics General-Post estimation Manage estimation results Store
estimation results









6
Dialog box estimates store, isi Store estimation result under the name: fixed



Stata result window akan menunjukkan perintah estimates store



Perbedaan antar firm pada fixed effect model dapat ditunjukkan pada intercept-nya.
Gunakan LSDV model, ketik :

xi: regress y x2 x3 i.firm



7
Random Effects Model

Klik Statistics Cross-sectional time series (Generalized) linear models-Panel-
data linear regression



Hasil estimasi random effects model :








8
Hausman Test

Klik Statistics General-Post estimation Tests Hausman Specification test



Isi box consistent estimation dengan : fixed



Chi square statistics :




9
Breusch Pagan LM test







10
Quick Reference


Analisis awal regresi data panel
xtsum

Estimasi data panel
Fixed Effect
xtreg variabel_dependen variabel_independen, fe
xi: regress variabel_dependen variabel_independen i.panel_id

Random Effect
xtreg variabel_dependen variabel_independen, re


Post Estimation
Hausman Test
estimates store nama_hasil_estimasi
hausman nama_hasil_estimasi

Breusch-Pagan LM Test
xttest0
11
Data Susenas

You might also like