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.
Related Posts with Creating a column out of the results from a loop
how can I highlight just one comment in Twoway Graph Dear members, I have a data information by country, from which I made a twoway Graph, however, usin…
Comparing proportions by two different variablesHello there, I want to make compare two proportions of a categorical variable by two different expl…
Adding Dummy VariablesHi All, So I am new to using Stata. I have a preset excel file and wanted to create dummy variables…
how to graph bar of categorical variablesDear Stata users, Suppose there is a categorical variable which has values of 1, 2, 3 representing …
Troubles with rownumb() in codeHello stata users, I am having troubles with rownumb() in my code. Below is the code and data. Code…
Subscribe to:
Post Comments (Atom)
0 Response to Creating a column out of the results from a loop
Post a Comment