Hi, everyone.
I am recently curious about using quantile regression model to detect effects from extreme observations.
So far, I have reviewed many posts and come up with the idea to do quantile regression with a fixed effect.
However, it seems that the results do not present any information about the R^2 or Within R^2 while I find some packages used in R like rqpd may show the result as well but I am not sure whether it functions correctly because it shares totally different result with those I get using xtqreg and mmqreg in stata.
First question: Whether my Stata code presented below is incorrect or not? I find that the coefficients are similar in both Stata codes but totally different from that in R.

while

The R code is (if you are curious about):

Second question: Whether it is possible to get R^2 or Within R^2 if I use xtqreg and mmqreg in Stata as my professor is curious about R^2 to see how well it fits.
I am recently curious about using quantile regression model to detect effects from extreme observations.
So far, I have reviewed many posts and come up with the idea to do quantile regression with a fixed effect.
However, it seems that the results do not present any information about the R^2 or Within R^2 while I find some packages used in R like rqpd may show the result as well but I am not sure whether it functions correctly because it shares totally different result with those I get using xtqreg and mmqreg in stata.
First question: Whether my Stata code presented below is incorrect or not? I find that the coefficients are similar in both Stata codes but totally different from that in R.
bootstrap, cluster(companyid) idcluster(_company) reps(100) seed(1234): xtqreg pb ///
interest_dev lev_fin size liq_curr roa tangibility i.year if floating_exposure == 1, i(_company) ls q(0.25)
interest_dev lev_fin size liq_curr roa tangibility i.year if floating_exposure == 1, i(_company) ls q(0.25)
while
mmqreg qt ///
interest_dev $xlist i.year if floating_exposure == 1, q(25) abs(_company)
interest_dev $xlist i.year if floating_exposure == 1, q(25) abs(_company)
The R code is (if you are curious about):
fit.rqpd <- rqpd(QT ~ Interest_DEV + Liq + Curr + Lev_fin + ROA + Size + Tangibility |
Company, data = pdata, panel(lambda = 5, taus=c(0.1, 0.25, 0.5, 0.75, 0.9), tauw=rep(1/5, 5)), method = "pfe")
Company, data = pdata, panel(lambda = 5, taus=c(0.1, 0.25, 0.5, 0.75, 0.9), tauw=rep(1/5, 5)), method = "pfe")
Second question: Whether it is possible to get R^2 or Within R^2 if I use xtqreg and mmqreg in Stata as my professor is curious about R^2 to see how well it fits.
Comment