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
Sorry, double post.o …
Should we test anticipation effect for Diff-in-Diff in natural event?Normally, the anticipation effect is tested as an assumption for Diff-in-Diff. However, it seems tha…
Reverse CommandI am trying to reverse the order of some categorical variables in my dataset. There was previously a…
inference randomizationHi everyone, I hope you are all doing good. I have to do an inference randomization but I don't real…
Replace values for all rows of a study ID, based on a value in a single row.Hello, I am very new to stata and trying to teach myself how to use it. I wanted to determine if the…
Subscribe to:
Post Comments (Atom)
0 Response to Creating a column out of the results from a loop
Post a Comment