I have a panel data and I have used a loop to tabulate the standard errors by stacking 3 columns together. The standard error value is estimated for each year (1993-2018).
forvalues i = 1993(1)2018{
preserve
stack column1 column2 column3 if year == `i', into(a) clear
tabstat a, statistics( semean ) columns(variables)
restore
}
The problem is that after estimation, I have to manually input each value into one new column (from 1993-2018). Is there a way to add a command in the loop so that each se value that it estimates is automatically put into the same column?
Thank you.
0 Response to Creating a column out of the results from a loop
Post a Comment