[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

From |
Mandy fu <[email protected]> |

To |
[email protected] |

Subject |
st:ordering variables in output of --outreg2-command |

Date |
Mon, 8 Jun 2009 15:10:36 -0400 |

Hi all, I met a problem of ordering the variables in the output using --outreg2--command after OLS regressions. In the help file of outreg2, the explanation of odering variables are as follows: "There are several ways to order variables in the output. The first is to order them when running regression. The second way is to specify varlist from within outreg2. The third way is to reorder the rows by hand after the table is created by outreg2." I ordered the variables in the regressions, and specified the variables in the order I wanted to see in --outreg2--. I even tried ordering the variables in the data set . But the order in the output is still not neat. Here's an example of the command I used and the results: ** I run three regressions and want to put the outputs in one table: .reg y x1-x4 .outreg2 x1-x4 using auto2 .reg early_y early _x1-early_x3 .outreg2 early_x1-early_x3 using auto2 .reg late_y late_x2-late_x3 .outreg2 late_x2-late_x3 using auto2 **In the data set, the ordering of these varaibles are : **y early_y late_y x1-x4 early _x1-early_x3 late_x2-late_x3 ***The table of output looks like this: ----------------------------------------------------------------------------------------------------- y early_y late_y x1 $ x2 $ x3 $ x4 $ early_x1 $ early_x2 $ early_x3 $ late_x3 $ late_x2 $ _________________________________________________________ (Where $ denotes the estimates results.) Please notice the ordering of late_x3 and late_x2 is converted. Waht I I want is to get late_x2 above late_x3 in the table. But I cannot figured out why these two variables are presented in an order different than what I specified in the commands. I want to solve this problem and get the ordering of the variables correct because my goal is to get a final product like the following table after a little work by hand: ----------------------------------------------------------------------------------------------------- y early_y late_y X1 $ $ X2 $ $ $ X3 $ $ $ X4 $ ------------------------------------------------------------------------------------------------------ I know I could correct the ordering by hand, but the problem is that I have a number of such tables to work on. Editing by hand is easy to make mistakes and it also means lots of work. I was wondering if anyone has some suggestion on this problem. Any comments will be helpful. Thanks very much! Mandy * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**Follow-Ups**:**RE: st:ordering variables in output of --outreg2-command***From:*Roy Wada <[email protected]>

**RE: st:ordering variables in output of --outreg2-command***From:*Roy Wada <[email protected]>

- Prev by Date:
**st: RE: Forward orthogonal deviations with unbalanced panel data** - Next by Date:
**RE: st: Log Normality of Dependentvar** - Previous by thread:
**Re: st: AW: Test for serial correlation in TSCS data: pooled Lagrange test vs. xtserial command** - Next by thread:
**RE: st:ordering variables in output of --outreg2-command** - Index(es):

© Copyright 1996–2024 StataCorp LLC | Terms of use | Privacy | Contact us | What's new | Site index |