Hello, everyone; I have state-level panel data comprising 50 US states from 2005 to 2022. This dataset has three dependent variables: proportions of state financial support for student financial aid (stfinaid), general appropriations to colleges (st_approp), and amount given to colleges through grants and contracts (st_gnc). In each observation, the sum of the three dependent variables is equal to 1 (i.e., the state's total support for higher education).
I have five independent variables, including economic freedom (econfree), performance-based funding (pbf), total private college enrollment (totenpvt), legislative professionalism(lp), and 18 to 24 years population (pop18to24). Here, I have shown data for only 20 states over three years, from 2005 to 2007.
I want to transform my dependent variables to Dirichlet Distribution using STATA’s ‘dirifit’ command. I have already read STATA’s help and Maarten Buis’s two presentations (2006 and 2010) on analyzing proportions, but I am still unsure how to use the ‘dirifit’ command. After using ‘dirifit’ command, I will apply fixed effects using the ‘xtreg’ command.
Could someone kindly guide me on how to use ‘dirifit’ command followed by ‘xtreg’ command? I have been using 'xtreg' but I don't how to use after 'dirifit.'
Thank you,
Ijaz
I have five independent variables, including economic freedom (econfree), performance-based funding (pbf), total private college enrollment (totenpvt), legislative professionalism(lp), and 18 to 24 years population (pop18to24). Here, I have shown data for only 20 states over three years, from 2005 to 2007.
Code:
input float state_code str16 state float(year stfinaid st_approp st_gnc) byte(econfree pbf) float(totenpvt lp pop18to24) 1 "Alabama" 2005 .0027806354 .9358705 .06134879 15 0 .1133934 1391.457 .09278798 1 "Alabama" 2006 .003616355 .9166794 .0797042 15 0 .11134716 1347.974 .10012633 1 "Alabama" 2007 .004488028 .9158435 .07966851 19 0 .11545899 1310.644 .0988165 2 "Alaska" 2005 .003598831 .9458614 .05053981 50 0 .05233803 31820.635 .10380942 2 "Alaska" 2006 .005195576 .9386975 .05610693 50 0 .04863795 30826.24 .11153745 2 "Alaska" 2007 .005223306 .9440607 .05071598 49 0 .04885167 29972.557 .11783993 3 "Arizona" 2005 .0017848266 .9509934 .04722178 9 0 .42074955 31804.73 .09478752 3 "Arizona" 2006 .001637462 .9458956 .05246696 10 0 .4220104 30810.83 .09504667 3 "Arizona" 2007 .013068232 .9319074 .05502433 23 0 .4767367 29957.58 .0934529 4 "Arkansas" 2005 .03502926 .8499562 .1150146 20 0 .12129366 18641.549 .09323022 4 "Arkansas" 2006 .05072419 .8271005 .1221753 27 0 .12407328 18507.04 .0962374 4 "Arkansas" 2007 .05081435 .8363829 .11280274 28 0 .1249116 18430.15 .09577229 5 "California" 2005 .0967054 .8101667 .0931279 47 0 .18180065 146937.86 .09423756 5 "California" 2006 .09781416 .8062217 .09596422 48 0 .1778098 143769.77 .10404783 5 "California" 2007 .09043077 .814012 .0955573 47 0 .17103037 141172.6 .104993 7 "Connecticut" 2005 .0445298 .8618568 .0936135 22 0 .390592 37105.523 .07755974 7 "Connecticut" 2006 .09396895 .7652938 .14073719 20 0 .3971299 35945.973 .09114106 7 "Connecticut" 2007 .0981563 .8147151 .0871286 16 0 .39596415 34950.508 .09242217 8 "Delaware" 2005 .279817 .720183 0 20 0 .26220223 52722.97 .08801141 8 "Delaware" 2006 .2442309 .7557691 0 24 0 .26384702 52497.16 .09775084 8 "Delaware" 2007 .2699953 .7300047 0 25 0 .26482868 52425.76 .09852052 9 "Florida" 2005 .12571846 .7605692 .11371229 8 0 .26735812 39644.6 .08542374 9 "Florida" 2006 .12880301 .7484795 .12271743 9 0 .27512524 39098.95 .0890446 9 "Florida" 2007 .12326452 .7558233 .12091216 5 0 .26255676 38690.21 .08878798 10 "Georgia" 2005 .18537527 .7707725 .04385226 9 0 .2177975 21897.56 .0948061 10 "Georgia" 2006 .1699736 .7814682 .04855823 10 0 .22506984 21738.326 .10075523 10 "Georgia" 2007 .15584846 .8030966 .04105493 11 0 .2222179 21646.85 .0988006 11 "Hawaii" 2005 .003246772 .7296168 .26713642 41 0 .2584165 45321.74 .08938278 11 "Hawaii" 2006 .0029226656 .7151033 .28197408 42 0 .25823155 44996.66 .09742995 11 "Hawaii" 2007 .0557091 .6658583 .27843264 40 0 .2480887 44811.54 .09654056 12 "Idaho" 2005 .002497227 .8981326 .09937017 25 0 .2352762 20734.035 .10437335 12 "Idaho" 2006 .018277815 .8768147 .1049075 23 0 .2489217 20387.785 .10429639 12 "Idaho" 2007 .003464603 .9025261 .09400925 21 0 .24122456 20116.514 .097008 13 "Illinois" 2005 .17399083 .7223806 .10362858 30 0 .3488443 76356.54 .09074374 13 "Illinois" 2006 .1770583 .7130849 .10985686 29 0 .3495486 73970.39 .10048753 13 "Illinois" 2007 .19683643 .6862172 .11694638 26 0 .3534841 71921.91 .10110097 14 "Indiana" 2005 .1698264 .7522808 .0778928 24 0 .27712247 15372.287 .0892171 14 "Indiana" 2006 .17823847 .7556606 .066100955 22 0 .26734152 14891.902 .0987039 14 "Indiana" 2007 .1974633 .7440481 .05848865 21 1 .2713091 14479.496 .0969948 15 "Iowa" 2005 .06994651 .8920375 .03801601 26 0 .3512102 28333.43 .09348233 15 "Iowa" 2006 .06840197 .8917735 .03982456 26 0 .3721157 29771.31 .10581154 15 "Iowa" 2007 .06721614 .8842185 .0485653 29 0 .4014491 31205.81 .10103154 16 "Kansas" 2005 0 .91526 .08474001 19 0 .12486912 9144.682 .09965537 16 "Kansas" 2006 .02644302 .9120745 .06148242 18 1 .1314589 9926.249 .10789251 16 "Kansas" 2007 .02323154 .9194295 .05733893 15 1 .13658047 9526.51 .10409413 17 "Kentucky" 2005 .12144458 .7006003 .1779551 32 0 .19527414 36645.793 .0903548 17 "Kentucky" 2006 .12359276 .7051803 .17122693 35 0 .1974737 43220.35 .09342703 17 "Kentucky" 2007 .12877673 .6927116 .1785117 34 0 .2010008 35242.355 .09336825 18 "Louisiana" 2005 .0897527 .7123476 .19789965 31 0 .10370991 22263.31 .10416546 18 "Louisiana" 2006 .08985943 .7173808 .1927598 31 0 .16277775 21567.584 .10827381 18 "Louisiana" 2007 .08359338 .7452673 .17113927 27 0 .1593327 20970.305 .10990626 19 "Maine" 2005 .04767591 .7851633 .1671608 45 0 .28623357 15086.044 .0840697 19 "Maine" 2006 .04401449 .7899513 .1660342 46 0 .28843805 11230.55 .08805712 19 "Maine" 2007 .001734564 .8271238 .17114164 46 0 .2904433 15868.778 .08754053 20 "Maryland" 2005 .06930555 .7868726 .14382194 6 0 .19694246 53670.49 .08789802 20 "Maryland" 2006 .06586162 .7839794 .15015897 14 0 .1981001 53918.96 .09546102 20 "Maryland" 2007 .0683832 .7931583 .13845849 10 0 .18998453 54298.11 .09723168 end
I want to transform my dependent variables to Dirichlet Distribution using STATA’s ‘dirifit’ command. I have already read STATA’s help and Maarten Buis’s two presentations (2006 and 2010) on analyzing proportions, but I am still unsure how to use the ‘dirifit’ command. After using ‘dirifit’ command, I will apply fixed effects using the ‘xtreg’ command.
Could someone kindly guide me on how to use ‘dirifit’ command followed by ‘xtreg’ command? I have been using 'xtreg' but I don't how to use after 'dirifit.'
Thank you,
Ijaz

Comment