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

From |
"Martin Weiss" <martin.weiss1@gmx.de> |

To |
<statalist@hsphsun2.harvard.edu> |

Subject |
st: AW: small problem with 'stack' command ! |

Date |
Thu, 24 Sep 2009 12:32:01 +0200 |

<> You should give an excerpt of your data to make answers to this rather opaque question possible. Also, have you had a look at -reshape-? HTH Martin -----Ursprüngliche Nachricht----- Von: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Marwan Elkhoury Gesendet: Donnerstag, 24. September 2009 12:30 An: statalist@hsphsun2.harvard.edu Betreff: st: small problem with 'stack' command ! dear statalist, I have a minor problem with the 'stack' command in stata (stata 10 for windows xp). I have 5 groups of countries of various size length which I want to stack into a single group of two variables, say, ctryg totrnk. right now I have cntry_i, rnk_i, for i=1 to 5 and if I write the following: stack cntry_1 rnk_1 cntry_2 rnk_2 cntry_3 rnk_3 cntry_4 rnk_4 cntry_5 rnk_5, into(cntry_1 rnk_1) wide clear ren cntry_1 cntryg ren rnk_1 totrnk It, in fact, creates two variables of size length the smallest of the size length of the groups and not stacking the entire number of observations. what would be the easiest and smartest way of stacking this 'unbalanced' group of variables, if any, to create one group of two variables from the 5 different groups ? best regards, Marwan Elkhoury * * 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/ * * 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/

**References**:**st: small problem with 'stack' command !***From:*Marwan Elkhoury <elkhoury.marwan@gmail.com>

- Prev by Date:
**st: small problem with 'stack' command !** - Next by Date:
**st: hausman like test to test FE model against a model with unrestricted covariances** - Previous by thread:
**st: small problem with 'stack' command !** - Next by thread:
**st: hausman like test to test FE model against a model with unrestricted covariances** - Index(es):

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