Hi,
I would like to merge by "var" which is a string variable without changing the sorting of the master dataset. The idea behind it is that I have (string) summary statistics and I would like to append further financial metrics to it.
This is from outreg2:
I am trying to merge using "table3_order.dta":
with the following code:
When I merge, the outreg2 output table gets messed up. Is there a clean way to do this? Variables "var" change at each iteration of the backtesting, so I need to get everything automated... Please help. Thanks!
I would like to merge by "var" which is a string variable without changing the sorting of the master dataset. The idea behind it is that I have (string) summary statistics and I would like to append further financial metrics to it.
This is from outreg2:
Code:
v1 v2 v3 v4 v5 v6 v7 v8 v9 (1) (2) (3) (4) (5) (6) (7) (8) VARIABLES N mean sd min p50 max skewness kurtosis BTC 61.000000 -0.002955 0.088972 -0.329439 -0.010461 0.265058 -0.279037 6.248104 mkt 61.000000 -0.001710 0.028785 -0.093254 0.000000 0.055102 -0.719422 3.691702 priceforecast 61.000000 0.008227 0.074687 -0.171325 0.005751 0.212946 0.024269 4.022328 pricemom 61.000000 0.007419 0.084524 -0.258553 0.006976 0.212946 0.017151 3.950582 pricedirection 61.000000 0.006597 0.077920 -0.155021 0.012606 0.212946 0.058501 3.048849 codeupgrade 61.000000 0.005103 0.076297 -0.239815 0.008471 0.212946 -0.181075 4.418395 futurevspast 61.000000 0.003999 0.080698 -0.163252 0.002805 0.212946 0.260134 3.064196 hodl 61.000000 0.003862 0.080947 -0.239815 0.005570 0.232762 -0.235608 3.781521 violence 61.000000 0.003279 0.081757 -0.136910 0.018439 0.230327 0.171295 3.099122 combo 61.000000 0.005498 0.058157 -0.119731 0.002235 0.215777 0.746282 5.205468
Code:
n var 1 BTC 2 mkt 3 violence 4 hodl 5 futurevspast 6 codeupgrade 7 pricedirection 8 pricemom 9 priceforecast 10 combo
Code:
rename v1 var merge m:1 var using table3_order.dta, sorted force
Comment