Hello everybody.
I wish to apply quantile regression to a panel dataset of 21 countries over a 48 year period.
My model:
p(i,t) = b(0) + T(t) + C(i) + b(1)*p(i,t-1) + b(2)*x(i,t) + e(i,t)
I have come across the following commands but am confused on which one to go for:
Regards,
Sebastián.
I wish to apply quantile regression to a panel dataset of 21 countries over a 48 year period.
Code:
* Example generated by -dataex-. For more info, type help dataex clear input str28 Country long pais2 float(ln_co2pc ln_co2pc_gr ln_gdppc_gr ei_ch res_share_ch) "Argentina" 1 8.13736 -.003316879 .00005722046 .0009368509 -.5843963 "Argentina" 1 8.172827 .035467148 .01150322 .0010287017 -.19065896 "Argentina" 1 8.155382 -.01744461 .03779411 -.0017663687 1.1816183 "Argentina" 1 8.113881 -.04150105 -.016004562 -.0006288141 -1.1635613 "Argentina" 1 8.141445 .02756405 -.035694122 .004128687 -.4502255 "Argentina" 1 8.168763 .027318 .05205154 -.003269479 .4519265 "Argentina" 1 8.149868 -.01889515 -.06098747 .005923823 .7232267 "Argentina" 1 8.188429 .03856087 .08229637 -.003776513 -.03159031 "Argentina" 1 8.154454 -.033974648 -.000295639 .000064082444 1.6892276 "Argentina" 1 8.121045 -.03340912 -.06901169 .003573708 .3562208 "Argentina" 1 8.091192 -.029852867 -.02334976 .0005264431 .22335 "Argentina" 1 8.101911 .010718346 .02646637 -.0008517876 .55891395 "Argentina" 1 8.075928 -.025982857 -.0005168915 .0005473718 .3025955 "Argentina" 1 7.984149 -.09177828 -.06927109 .001306817 .2845615 "Argentina" 1 8.046303 .06215334 .04386711 -.0015678406 -.57471985 "Argentina" 1 8.082119 .035816193 .01099968 .0022074506 -.04727695 "Argentina" 1 8.102077 .01995754 -.02637863 .0035996065 -2.0891473 "Argentina" 1 8.050529 -.051548 -.08927727 .003797956 -.8556552 "Argentina" 1 7.970507 -.08002138 -.03951073 -.00005368143 2.5997005 "Argentina" 1 8.018763 .04825544 .07338333 -.0037634596 -.7621235 "Argentina" 1 8.033707 .014944077 .06285858 -.004395187 .8977495 "Argentina" 1 8.054319 .020612717 .06581497 -.005773418 .9866562 "Argentina" 1 8.079103 .02478409 .04406929 .00046010315 .05130513 "Argentina" 1 8.066797 -.012306213 -.04115677 .00382334 .1040608 "Argentina" 1 8.107716 .04091835 .04185677 -.0021086782 -.889446 "Argentina" 1 8.115711 .0079956055 .066394806 -.0032310635 .5504242 "Argentina" 1 8.129745 .014033318 .026456833 -.0015993714 .14474016 "Argentina" 1 8.159109 .029364586 -.04557419 .004682116 -1.4123623 "Argentina" 1 8.14549 -.013619423 -.01892853 .00665576 -.7077209 "Argentina" 1 8.103066 -.04242325 -.05600929 -.0001920089 1.7975198 "Argentina" 1 8.038289 -.064777374 -.12618446 .007865772 .4461319 "Argentina" 1 8.097865 .05957603 .07396126 -.001951866 -.9268353 "Argentina" 1 8.173456 .07559109 .0758953 .00006687641 -1.3884256 "Argentina" 1 8.202891 .02943516 .07445145 -.005813979 .53251714 "Argentina" 1 8.245454 .04256248 .067243576 -.003355786 .10701164 "Argentina" 1 8.326015 .08056164 .07625961 -.0004028007 -1.0392638 "Argentina" 1 8.349349 .02333355 .029844284 -.0015919358 .4650531 "Argentina" 1 8.271428 -.07792091 -.07100296 -.000819169 1.7649453 "Argentina" 1 8.342472 .07104397 .0862999 -.003054425 .3953756 "Argentina" 1 8.379102 .036629677 .04797363 -.0014053434 .19075124 "Argentina" 1 8.384642 .005539894 -.02078247 .00164406 -.5361876 "Argentina" 1 8.402295 .017653465 .01326561 .00021656603 .006848871 "Argentina" 1 8.376057 -.02623844 -.03585434 .0021337345 .9186995 "Argentina" 1 8.389862 .01380539 .01672554 -.0012462884 -1.0696038 "Argentina" 1 8.375152 -.014710426 -.031024933 .0019309297 .5231693 "Argentina" 1 8.350884 -.024267197 .017990112 -.0033791065 1.1013072 "Argentina" 1 8.3014765 -.04940796 -.03612709 .0008261427 -.1671047 "Argentina" 1 8.26208 -.03939629 -.029878616 .0004553869 -.0826373 "Bolivia" 2 6.417964 .11560774 .06134224 .00028506666 -.27220392 "Bolivia" 2 6.502983 .08501911 .04071999 8.7842345e-06 -1.1737288 "Bolivia" 2 6.568667 .06568384 .013886452 .002845157 -1.4350955 "Bolivia" 2 6.675215 .1065483 .0552597 .0034069084 -2.2711718 "Bolivia" 2 6.748501 .07328606 .030041695 .002345994 -.3423438 "Bolivia" 2 6.826501 .07800007 .027706146 .003293414 -1.382017 "Bolivia" 2 6.871734 .04523277 -.0006895065 .0026355125 -.8965138 "Bolivia" 2 6.866856 -.004878521 -.01944828 .00717634 -1.699529 "Bolivia" 2 6.855255 -.011600494 -.034768105 .018463783 12.919066 "Bolivia" 2 6.869163 .01390791 -.018164635 -.0007222965 -.18970098 "Bolivia" 2 6.82934 -.03982353 -.06105423 .006938927 1.632059 "Bolivia" 2 6.755651 -.073688984 -.06207848 -.002753846 6.000739 "Bolivia" 2 6.714844 -.04080629 -.022953033 .003282882 -1.1723045 "Bolivia" 2 6.652743 -.06210136 -.03777981 .002304025 .15865235 "Bolivia" 2 6.644448 -.008295059 -.046875 -.0014007166 2.0801692 "Bolivia" 2 6.693766 .04931831 .003443718 -.006210499 -9.055454 "Bolivia" 2 6.692139 -.0016274452 .007709503 .002043061 2.1021533 "Bolivia" 2 6.770207 .07806873 .016329765 .002484992 -3.758691 "Bolivia" 2 6.729681 -.04052639 -.0556879 .002510376 1.1791264 "Bolivia" 2 6.722625 -.00705576 .028149605 -.0020847544 1.0702497 "Bolivia" 2 6.741838 .0192132 -.007154465 .00249432 -2.622808 "Bolivia" 2 6.758414 .016575336 .018341064 .0018295944 -.25524372 "Bolivia" 2 6.823371 .06495714 .02246952 .003341369 -3.983248 "Bolivia" 2 6.903273 .0799017 .023166656 .00595139 -2.921757 "Bolivia" 2 6.804934 -.0983386 .020656586 .020102695 -6.227832 "Bolivia" 2 6.789863 -.015071392 .026638985 .005877331 -1.674051 "Bolivia" 2 6.819801 .02993822 .02772522 -.005191907 -.7293355 "Bolivia" 2 6.827318 .007516861 -.01666832 -.01882285 4.780262 "Bolivia" 2 6.770886 -.05643177 -.00352478 -.032242276 -1.355452 "Bolivia" 2 6.728434 -.04245186 -.0021419525 .002985671 -.8685746 "Bolivia" 2 6.784127 .05569315 .006061554 .013262115 -3.769071 "Bolivia" 2 6.86026 .0761323 .00859642 -.0003261119 -.9186755 "Bolivia" 2 6.938504 .0782442 .02305603 -.002343118 .16695635 "Bolivia" 2 7.003305 .064801216 .0257473 .005370155 -1.99451 "Bolivia" 2 7.07073 .06742525 .02963829 -.0021358952 .3173762 "Bolivia" 2 7.161592 .0908618 .027708054 -.0019321963 .26841784 "Bolivia" 2 7.226458 .06486559 .04302597 -.003432579 .11485765 "Bolivia" 2 7.241869 .015411377 .016647339 -.00028829277 -.3807515 "Bolivia" 2 7.317679 .07581043 .024331093 .003269054 -1.3078908 "Bolivia" 2 7.386178 .06849861 .034879684 .002412088 -.8603185 "Bolivia" 2 7.43899 .05281162 .034342766 .002733275 -1.050217 "Bolivia" 2 7.502742 .063752174 .05072784 -.00496278 .1757908 "Bolivia" 2 7.55739 .0546484 .03823757 .003894068 -1.459804 "Bolivia" 2 7.561952 .004561901 .03261566 -.004148811 .2880547 "Bolivia" 2 7.599395 .03744268 .02707863 .0012438297 -1.3111032 "Bolivia" 2 7.603081 .003685951 .02657223 -.00010018796 .15679426 "Bolivia" 2 7.603012 -.00006866455 .02697849 -.002455078 .29033864 "Bolivia" 2 7.568829 -.034183502 .007639885 -.0019835234 .8072431 "Brasil" 3 6.844649 .06707764 .08870983 -.0045852438 -1.772898 "Brasil" 3 6.985705 .14105606 .10700321 -.0043715984 -3.683734 "Brasil" 3 7.053004 .06729889 .05474091 -.0011309758 -1.7145983 "Brasil" 3 7.088357 .035353184 .02668667 -.0009966865 -1.1710585 end label values pais2 pais2 label def pais2 1 "Argentina", modify label def pais2 2 "Bolivia", modify label def pais2 3 "Brasil", modify
p(i,t) = b(0) + T(t) + C(i) + b(1)*p(i,t-1) + b(2)*x(i,t) + e(i,t)
I have come across the following commands but am confused on which one to go for:
- mmqreg
- xtqreg
- qregpd
Code:
gen ln_con2pc_gr_1 = l.ln_co2pc_gr qregpd ln_co2pc_gr ln_co2pc_gr_1 ln_gdppc_gr ei_ch res_share_ch, id(pais2) fix(year) q(25) xtqreg ln_co2pc_gr ln_co2pc_gr_1 ln_gdppc_gr ei_ch res_share_ch year, i(pais2) quantile(.25) mmqreg ln_co2pc_gr ln_co2pc_gr_1 ln_gdppc_gr ei_ch res_share_ch year, abs(pais2) q(25)
Sebastián.
Comment