Hello every one
I am addressing a problem with the process of Placebo test
First, I am using the following process
the problem represent in two issues
1- the matrix command does not create the plac_coeff
I don't know why
thenI tried to fix it all of a sudden the second issue appeared which is getting an error message (reg is unrecognized command)
Below id the data example
I am addressing a problem with the process of Placebo test
First, I am using the following process
HTML Code:
set seed 12345
gen randomplacebo = runiform()
bysort code (randomplacebo): keep if _n == 1
gen placebo_gb = 0
bysort code: gen rank = _n
bysort code: replace placebo_gb = 1 if rank <= 167
gen random_year = floor(2016 + 7 * runiform())
replace random_year = .
replace random_year = floor(2016 + 7 * runiform()) if placebo_gb == 1
gen PlacPost = (year >= random_year & placebo_gb == 1)
matrix plac_coeff = J(1000, 1, .)
forval i = 1/1000 {
quietly reg SL PlacPost growth Bsize dual bmeet bindp size leverage mtb roa own soe , robust
matrix plac_coeff[`i', 1] = _b[PlacPost]
}
1- the matrix command does not create the plac_coeff
I don't know why
thenI tried to fix it all of a sudden the second issue appeared which is getting an error message (reg is unrecognized command)
Below id the data example
HTML Code:
---------------------- copy starting from the next line ----------------------- [CODE] * Example generated by -dataex-. For more info, type help dataex clear input double SL byte gb double growth float Bsize byte(dual bmeet bindp) double(size leverage mtb roa Institutionalownership) byte tateowned1no0 . 0 .049910983979371 11 0 16 4 29.351484298706055 .9154999852180481 30.661100387573242 .008500000461935997 .67149 0 . . . . . . . . . . . . . . . . . . . . . . . . . . .09834200143814087 0 .25523611968287 9 0 5 3 19.305076599121094 .4032000005245209 .2475000023841858 .026599999517202377 .356486 0 .053509000688791275 0 -.19098814131373998 14 0 9 5 21.620494842529297 .4593999981880188 .9158999919891357 -.14079999923706055 .19131399999999998 0 .021412000060081482 0 .16732135609520998 9 0 14 3 23.187393188476563 .6413999795913696 1.2348999977111816 .047200001776218414 .370434 1 .07607199996709824 0 .035608975975038 6 0 9 3 20.33896255493164 .47429999709129334 .20190000534057617 -.04989999905228615 .280746 0 .11843899637460709 0 .020846702148776 7 0 7 3 20.255861282348633 .1005999967455864 .22930000722408295 .03669999912381172 .304193 1 .022972000762820244 0 .10108411233325 9 1 12 3 24.119443893432617 .6499000191688538 3.2221999168395996 .023399999365210533 .20340499999999997 0 .06369999796152115 0 .054143947990315994 10 0 18 4 21.9090576171875 .8195000290870667 1.2246999740600586 -.22779999673366547 .356523 0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .015778999775648117 0 .36626875061248 7 0 15 3 23.882762908935547 .6520000100135803 1.9980000257492065 .2493000030517578 .34084200000000003 1 .030642999336123466 0 -.10915888625072 8 1 6 3 17.64130210876465 .7081000208854675 .008200000040233135 -.002199999988079071 .211736 0 .011579000391066074 0 .46100472358042 9 0 12 3 23.180103302001953 .8062999844551086 1.222499966621399 .03909999877214432 .24984 0 . . . . . . . . . . . . . .07369200140237808 0 -.040811754553639 7 1 10 3 20.402915954589844 .6327999830245972 .3495999872684479 .012400000356137753 0 0 . . . . . . . . . . . . . .030626999214291573 . . . . . . . . . . . . .03307599946856499 0 .062322601922208 9 0 16 3 21.17170524597168 .7148000001907349 .36959999799728394 .017500000074505806 .448203 0 . . . . . . . . . . . . . .01860399916768074 0 .18169905564574002 8 0 16 3 21.229055404663086 .33709999918937683 .22579999268054962 .056299999356269836 .7832389999999999 1 . . . . . . . . . . . . . .014062000438570976 0 . 9 0 11 3 24.13275718688965 .4814999997615814 1.0128999948501587 .07769999653100967 . 1 .01681699976325035 0 -.003924904188825701 10 0 9 4 24.47549057006836 .5436999797821045 3.2351999282836914 .04149999842047691 .735984 1 . . . . . . . . . . . . . .03072500042617321 0 .119258384875 9 0 14 3 23.39475440979004 .4277999997138977 1.1057000160217285 .06639999896287918 .801096 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17437300086021423 0 .08323242724564199 7 0 5 3 20.204423904418945 3.0195000171661377 .593999981880188 .08169999718666077 .1133 0 .011056000366806984 0 .50462039954484 11 0 8 4 22.998014450073242 .5861999988555908 1.0130000114440918 .1671999990940094 .355596 0 . . . . . . . . . . . . . .0335410013794899 0 -.038441168975833 6 1 18 3 21.79387855529785 .0560000017285347 .4708999991416931 .041600000113248825 .354792 0 .013434999622404575 0 .21652860506308 8 0 26 3 25.791440963745117 .670199990272522 6.424699783325195 .02810000069439411 .490576 0 .11671900004148483 0 -.17310673797027998 11 0 13 4 21.358858108520508 .4779999852180481 1.1654000282287598 .0674000009894371 .36304499999999995 0 .06391999870538712 0 -.11464818125397 8 1 4 3 24.32569122314453 .7760999798774719 6.949900150299072 .00019999999494757503 .7138549999999999 0 .022823000326752663 . . . . . . . . . . . . . . . . . . . . . . . . . .02340400032699108 0 .11880087320103999 18 0 17 6 25.95850944519043 .853600025177002 4.844099998474121 .017400000244379044 .808165 0 . . . . . . . . . . . . . .05964000150561333 0 -.021250012970181 11 0 13 4 21.38636589050293 .5866000056266785 .1363999992609024 .10689999908208847 .433977 0 .024584999307990074 0 .29886796731402 9 0 5 3 20.561124801635742 .6726999878883362 .2362000048160553 .11649999767541885 .496198 0 .01816900074481964 0 .51211310174228 9 0 12 3 22.7997989654541 .588100016117096 1.2303999662399292 .03620000183582306 .566122 1 .028418999165296555 0 .039461170949946 7 1 6 3 23.26841926574707 .5432999730110168 3.208699941635132 .02290000021457672 .211519 0 . . . . . . . . . . . . . .03984300047159195 0 -.034060130126626 9 0 12 3 22.451797485351563 .5430999994277954 .7978000044822693 .01720000058412552 .464224 1 . . . . . . . . . . . . . . . . . . . . . . . . . . .011703000403940678 0 .12940504787279 13 0 7 5 23.348308563232422 .554099977016449 .6209999918937683 .010400000028312206 .693481 1 .0807889997959137 0 .52796498371664 9 1 30 3 22.544965744018555 .4049000144004822 .23420000076293945 .0731000006198883 .7762720000000001 0 . . . . . . . . . . . . . .0571569986641407 0 -.16477859241217 6 0 5 3 21.392717361450195 .7064999938011169 .6272000074386597 .02319999970495701 .6247590000000001 1 .0024399999529123306 0 .18817371391192 9 0 39 3 24.210969924926758 .6710000038146973 .7857000231742859 .022700000554323196 .46820799999999996 1 .0398470014333725 0 . 9 0 11 3 20.36865997314453 .7486000061035156 .09749999642372131 -.9986000061035156 . 1 . . . . . . . . . . . . . .014310999773442745 0 .42255819614562 8 0 20 3 23.034378051757813 .7049999833106995 1.3410999774932861 .006800000090152025 .45431600000000005 1 . . . . . . . . . . . . . . . . . . . . . . . . . . .015792999416589737 0 .043902551988715004 9 0 8 3 23.24738311767578 .14100000262260437 .760699987411499 .0471000000834465 .700849 1 .03773999959230423 0 . 7 0 12 3 22.496482849121094 .552299976348877 1.079300045967102 .010200000368058681 . 1 . . . . . . . . . . . . . .015852000564336777 0 .14867623157033 15 0 11 5 22.217166900634766 .388700008392334 .534500002861023 .04960000142455101 .42896 1 .0032279998995363712 0 .08942154003554201 12 1 13 4 25.800275802612305 .6621999740600586 3.041100025177002 .023099999874830246 .29118099999999997 0 .06755799800157547 0 .083699528470525 7 0 20 3 22.83640480041504 .6952000260353088 .8960000276565552 .025299999862909317 .465391 0 .08585699647665024 0 .49467501404662 9 0 11 3 21.635513305664063 .6067000031471252 1.152400016784668 .04450000077486038 .454894 1 .06205400079488754 0 .042826530949328 9 0 10 3 21.558467864990234 .486299991607666 .7074000239372253 .013899999670684338 .29948 0 . . . . . . . . . . . . . .12762600183486938 0 .12522447336726 13 1 15 4 21.942197799682617 .7487000226974487 .2957000136375427 .09470000118017197 .023908 1 . . . . . . . . . . . . . . . . . . . . . . . . . . .024248000234365463 0 -.0049410912839277 9 0 0 3 21.811241149902344 .2644999921321869 .6065999865531921 .044599998742341995 .32241 0 .0025740000419318676 0 .22374620226563 11 0 11 4 27.12187957763672 .8219000101089478 5.038899898529053 .017500000074505806 .76265 1 .004184000194072723 0 .58460762144208 7 1 21 3 25.606090545654297 .7771999835968018 1.4117000102996826 .05220000073313713 .6143339999999999 0 .004726000130176544 0 .10496765836308 14 1 9 5 25.297420501708984 .5968999862670898 1.1497999429702759 .08990000188350677 .500071 0 .0030980000738054514 0 .15960978622249 14 1 8 5 25.968381881713867 .7027999758720398 2.9449000358581543 .051899999380111694 .30975 1 .022926999256014824 0 -.047803615854213 9 0 11 3 23.4027042388916 .4269999861717224 1.6261999607086182 .018300000578165054 .550543 1 . . . . . . . . . . . . . .005884999874979258 0 .27893578476124 9 0 17 3 24.71535873413086 .6816999912261963 2.707200050354004 .03799999877810478 .41822899999999996 1 .02875399962067604 0 .11162548692244 9 1 7 3 20.894826889038086 .7038000226020813 .27709999680519104 .0568000003695488 .034698 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3730219900608063 0 -.20860610039283 8 0 13 3 19.938995361328125 .6985999941825867 .1712000072002411 -.10729999840259552 .21473199999999998 0 . . . . . . . . . . . . . .027778999879956245 0 . 9 0 11 3 22.91562271118164 .8416000008583069 1.4505000114440918 .005799999926239252 . 1 .12467099726200104 0 .16724316933720002 9 0 5 3 22.291383743286133 .7404000163078308 2.175600051879883 .03790000081062317 .637891 1 . . . . . . . . . . . . . . . . . . . . . . . . . . .026197999715805054 0 -.007918100740661101 9 0 9 3 26.237625122070313 .8392999768257141 13.792900085449219 -.0044999998062849045 .521751 0 . . . . . . . . . . . . . .04418500140309334 0 .028251837408894 9 0 5 4 23.13256072998047 .5645999908447266 2.9598000049591064 .01720000058412552 .5731430000000001 1 .06007400155067444 0 -.08107873104593401 9 0 7 3 22.851938247680664 .4941999912261963 1.5194000005722046 .04320000112056732 .459741 0 .024880999699234962 0 .016766102680143 9 1 12 3 22.069517135620117 .4869999885559082 .7854999899864197 .029100000858306885 .49847299999999994 1 .1817139983177185 0 .1229802919175 11 0 14 4 21.961795806884766 .8253999948501587 2.895900011062622 .0026000000070780516 .086064 1 end [/CODE] ---------
Comment