I am trying to outreg information into an excel file. I have a large loop which runs a regression each time and then outregs the information via outreg2. This part works just fine. I am also trying to have a couple other statistics added to the same column of each outreg. For example I am running a correlation and storing it in a macro called Corr1. I would like to then add this correlation to the same column right after the R^2 but it's not working. Instead the statistics overlap each other or end up in the same column, either way they are not lined up helpfully. I've tried addstat as well but I always just got "invalid syntax". Here's the code I have :
outreg2 using "filename", append ctitle(`j', `k') addtext(`D',`Corr1', `Corr2', `Corr3', `Corr4', `Corr5')
D: Some r^2 ratio stored as a local macro
CorrX: Five different correlations with lags stored as macros as well.
The ctitle part is working just fine. j and k are just taken from the loop to give a title for each regression.
Does anyone know what I might be doing wrong?
Thanks,
Ben
outreg2 using "filename", append ctitle(`j', `k') addtext(`D',`Corr1', `Corr2', `Corr3', `Corr4', `Corr5')
D: Some r^2 ratio stored as a local macro
CorrX: Five different correlations with lags stored as macros as well.
The ctitle part is working just fine. j and k are just taken from the loop to give a title for each regression.
Does anyone know what I might be doing wrong?
Thanks,
Ben
Comment