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

From |
"Beatrice Crozza" <beatrice.crozza@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
st: Merging obervations of two variables |

Date |
Tue, 14 Oct 2008 23:38:47 +0100 |

Dear all, maybe this is a simple question, but I don't know how to overcome my problem. I have a variable time and I should generate another variables equal to time when another variable (code) is equal to 1 or 2. However, I don't know how to instruct stata for this. I tried with: gen time1= time if code==1 & code==2 but of course I will have all missing values. Thus, I created two variables: gen time1= time if code==1 gen time1= time if code==2 but I would like to merge the values of the two variables at this point. Any idea of how to do this? Thank you. Best, Bea * * 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: Merging obervations of two variables***From:*"Domenico Flotta" <domenico.flotta@gmail.com>

**st: Re: Merging obervations of two variables***From:*"Martin Weiss" <martin.weiss1@gmx.de>

- Prev by Date:
**Re: st: RE: How to calculate the time elapsed between two trading?** - Next by Date:
**st: Re: Merging obervations of two variables** - Previous by thread:
**st: How to calculate the time elapsed between two trading?** - Next by thread:
**st: Re: Merging obervations of two variables** - Index(es):

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