28.3.2021

Stata: Quantile Panel Regression

Fuente: Matthew Baker, 2016. "QREGPD: Stata module to perform Quantile Regression for Panel Data," Statistical Software Components S458157, Boston College Department of Economics. https://ideas.repec.org/c/boc/bocode/s458157.html

* Data

use C:\...


* Install qregpd

ssc install qregpd

help qregpd


* Set data as panel data

sort $id $year

xtset $id $year

xtdescribe


* Run regressions

qregpd y x1 x2, id( id) fix(year) quantile(.1)

qregpd y x1 x2, id( id) fix(year) quantile(.25)

qregpd y x1 x2, id( id) fix(year) quantile(.5)

qregpd y x1 x2, id( id) fix(year) quantile(.75)

qregpd y x1 x2, id( id) fix(year) quantile(.90)


* Save as .docx


** Install asdoc

ssc install asdoc

help asdoc


** Run regressions (again)

asdoc qregpd y x1 x2, id( id) fix(year) quantile(.1) replace nest

qregpd y x1 x2, id( id) fix(year) quantile(.25) nest

qregpd y x1 x2, id( id) fix(year) quantile(.5) nest

qregpd y x1 x2, id( id) fix(year) quantile(.75) nest

qregpd y x1 x2, id( id) fix(year) quantile(.90) nest

Por: Carlos Vilalta. Email: cvilalta@centrogeo.edu.mx