Cooper, M. J., Knott, A. M., & Yang, W. (2019). RQ innovation efficiency and firm value. Retrieved from https://papers.ssrn.com/sol3/papers....act_id=2631655
I want to run the model using 40-quarter rolling windows. I also require all firms to have a minimum of six quarters of non-missing (v3). I’m using the following command:
Code:
rolling, window(40) clear keep(qdate): xtmixed dep v1 v2 v3 v4 v5 if rd2_count >= 6 || gvkey: v3, covariance(unstructured)
Code:
predict re, reffects
last estimates not found r(301).
Is there another command that I can use to achieve my target??
My dataex:
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input long gvkey int qdate double rd_count float(dep v1 v2 v3 v4 v5) 1013 125 1 4.2810454 3.89506 .8870679 1.7791808 .5732369 -.09266371 1013 126 1 4.3009386 3.99765 .8870679 1.8234196 .8127064 -.09266371 1013 127 2 4.3155127 4.057127 .8870679 2.0518134 4.1086745 -.09266371 1013 128 2 4.1705956 4.060029 .8342126 2.0429072 -.08229524 -.04186421 1013 129 2 4.367281 4.044962 .8342126 2.0203547 .4631049 -.04186421 1013 130 2 4.4289937 4.053418 .8342126 2.1414769 -.9063404 -.04186421 1013 131 3 4.4893775 4.0594945 .8342126 2.1458142 4.390131 -.04186421 1013 132 3 4.364982 4.0491204 .900974 2.1057184 2.2903101 .06859277 1013 133 3 4.488625 4.0766726 .900974 2.1660779 2.5427036 .06859277 1013 134 3 4.536313 4.1267147 .900974 2.2160463 2.738644 .06859277 1013 135 3 4.65515 4.1411643 .900974 2.298075 3.05386 .06859277 1013 136 3 4.5127916 4.1207595 .9722929 2.255179 2.982191 .27345634 1013 137 3 4.7324457 4.161193 .9722929 2.3303947 2.9310336 .27345634 1013 138 4 4.750897 4.15721 .9722929 2.3105533 3.132228 .27345634 1013 139 3 4.854356 4.191653 .9722929 2.405954 3.155254 .27345634 1013 140 3 4.802167 4.196976 1.0932647 2.398168 3.06269 0 1013 141 3 4.944082 4.2664194 1.0932647 2.505281 3.219236 0 1013 142 4 5.013658 4.3102756 1.0932647 2.526928 3.602395 0 1013 143 3 5.157053 4.365465 1.0932647 2.580898 3.548755 0 1013 144 3 5.091238 4.457482 1.5303947 2.580898 3.815798 0 1013 145 3 5.262965 4.6495795 1.5303947 2.7686434 3.664126 0 1013 146 3 5.381339 4.772767 1.5303947 2.7851346 3.638165 0 1013 147 3 5.541468 4.875808 1.5303947 3.049842 3.401331 0 1013 152 2 5.657375 5.419238 2.0834336 3.3364456 3.8731575 0 1013 153 2 5.81304 5.481526 2.0834336 3.41464 3.590853 0 1013 154 2 5.893013 5.507131 2.0834336 3.378918 3.8895116 0 1013 155 1 5.981795 5.548924 2.0834336 3.54887 5.209546 0 1013 158 1 6.281796 5.686168 2.5994995 3.577249 4.1402097 0 1013 159 1 6.452207 5.743215 2.5994995 3.529327 3.329415 0 1013 161 1 6.64717 5.950989 3.1113796 3.628944 3.586653 0 1013 162 1 6.792793 6.207435 3.1113796 4.2044387 2.513656 0 1013 163 1 6.939254 6.411161 3.1113796 4.248495 3.201363 0 1013 164 1 6.698638 6.525909 2.4884005 4.3201513 2.8803215 0 1013 166 2 6.305362 6.598645 2.4884005 4.4308167 3.008747 0 1013 169 2 5.6981 6.293049 2.0281482 4.4379344 3.769076 0 1013 170 3 5.460011 5.764878 2.0281482 4.2282925 3.445852 0 1013 171 2 5.397257 5.331752 2.0281482 3.9512436 4.451891 0 1013 172 2 5.270946 5.250701 1.740466 3.802208 4.318914 0 1013 174 5 4.865995 5.332236 1.740466 3.962716 3.606611 0 1013 175 5 5.040194 5.259057 1.740466 3.505557 4.344455 0 1013 176 5 4.917789 5.207846 2.014903 3.4111476 4.301792 0 1013 177 5 4.999237 5.133443 2.014903 1.7227666 5.101518 0 1013 178 5 5.415656 5.48272 2.014903 2.397895 4.7272463 0 1013 179 4 5.574053 5.451038 2.014903 2.564949 4.603699 0 1013 180 4 5.484797 5.433722 2.104134 2.5176964 4.806886 0 1013 181 3 5.665734 5.389072 2.104134 2.6602595 4.6038895 0 1013 182 3 5.722277 5.381279 2.104134 2.8033605 4.8722 0 1013 184 3 5.608739 5.384953 2.1517622 2.721295 4.6136045 0 1013 185 3 5.880812 5.355642 2.1517622 2.9014215 4.46041 0 1013 186 4 5.839478 5.348535 2.1517622 2.912351 4.475927 0 1013 187 5 5.72815 5.3303 2.1517622 2.985682 4.4580727 0 1013 189 5 5.856217 5.31959 2.2027647 2.944439 4.525185 0 1013 190 5 5.846728 5.307773 2.2027647 2.850706 4.539351 0 1013 191 5 5.797576 5.294309 2.2027647 2.8390784 4.4781775 0 1013 193 3 5.974319 5.311727 2.360854 2.873565 4.64183 0 1013 194 3 5.944897 5.30231 2.360854 2.867899 4.646504 0 1013 195 3 5.864483 5.176714 2.360854 2.862201 4.6769137 0 1013 196 4 5.538515 5.131672 2.2027647 2.9704144 4.528624 0 1013 197 4 5.617135 5.129307 2.2027647 3.08191 4.5467887 0 1013 199 4 5.581991 5.064492 2.2300143 3.020425 4.4652066 0 1013 200 4 5.613128 5.035653 2.2300143 2.944439 4.494406 0 1013 201 4 5.718343 4.996536 2.2300143 2.912351 4.510057 0 1013 202 4 5.744925 4.987025 2.2300143 2.850706 4.505825 0 1017 121 8 3.5195136 3.6580336 .3442987 -.3523984 4.920324 0 1017 122 7 3.664126 3.724464 .3442987 -.3667253 4.92923 0 1017 123 8 3.529004 3.7695835 .3442987 -.6180397 5.177826 0 1017 124 9 3.621082 3.772416 .3442987 -.8074363 5.384064 0 1017 125 5 3.771427 3.765979 .26849926 -1.1332037 5.002959 0 1017 126 7 3.489727 3.752183 .26849926 -.7465479 4.897459 0 1017 127 9 3.514615 3.767483 .26849926 -.7011794 5.380409 0 1017 128 7 3.4108176 3.753379 .26849926 -1.1551826 5.442413 0 1017 129 7 3.317743 3.754269 .24451357 -1.0300195 4.794981 0 1017 130 6 3.2007525 3.767136 .24451357 -.7381446 4.924206 0 1017 131 10 3.345262 3.7840986 .24451357 -.6635884 5.313014 0 1017 132 7 3.495992 3.794972 .24451357 -.9364935 5.501009 0 1017 133 9 3.4349544 3.8059065 .15014265 -1.1086626 4.89318 0 1017 134 9 3.32338 3.805684 .15014265 -.424648 4.4932103 0 1017 135 11 3.313859 3.805239 .15014265 -.25231493 5.2781 0 1017 136 7 3.633763 3.791504 .15014265 -.3011051 5.425611 0 1017 137 6 3.426735 3.7845304 .0971267 -.9038682 5.427823 0 1017 138 8 3.431112 3.771427 .0971267 -.5816058 4.5213647 0 1017 140 6 3.5296786 3.752769 .0971267 -.5430046 5.546708 0 1021 120 4 2.5020096 1.911023 -1.1647521 -.7465479 1.255046 -2.063568 1021 121 4 2.592265 1.909098 -1.1647521 -1.0078579 1.4424384 -2.063568 1021 122 4 2.1637826 1.8908504 -1.4271164 -.236989 1.1546775 -2.995732 1021 123 6 2.2748027 1.866403 -1.4271164 -.58519006 1.96375 -2.995732 1021 124 5 2.2451677 1.836414 -1.4271164 -.6635884 1.595339 -2.995732 1021 125 5 2.31836 1.817427 -1.4271164 -1.0300195 1.7358943 -2.995732 1021 126 5 2.1804175 1.790759 -1.5847453 -.9088187 1.6605113 -2.886878 1021 127 5 2.248129 1.7662708 -1.5847453 -.9339457 1.9384538 -2.886878 1021 128 5 2.3179662 1.7430943 -1.5847453 -1.1551826 2.0020204 -2.886878 1021 129 5 2.280646 1.7518052 -1.5847453 -1.0642109 1.9844438 -2.886878 1021 130 4 2.237086 1.7313015 -1.5141277 -1.0847094 2.0352283 0 1021 131 5 2.2982757 1.7072903 -1.5141277 -.8370175 2.0547645 0 1021 132 . 2.2749054 1.7034745 -1.5141277 -.796288 2.091123 0 1021 133 5 2.219964 1.3658365 -1.5141277 -.4812669 2.0059295 0 1021 134 6 2.144761 1.3519617 -1.7778566 -.549913 2.0649621 0 1021 139 4 1.8691834 -.4764242 -1.826351 -1.2801342 1.9533113 0 1021 140 5 1.94976 -.5905906 -1.826351 -1.3318062 1.9444805 0 1021 141 4 1.9074663 -.5798185 -1.826351 -1.5945493 1.8944665 0 end format %tq qdate label var rd_count "count of rd"
0 Response to Rolling window with xtmixed
Post a Comment