Statalist


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

Re: st: RE: calculating number of bimesters


From   "Rodrigo Briceño" <rjbriceno@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: RE: calculating number of bimesters
Date   Wed, 17 Dec 2008 11:29:01 -0600

I managed that the best logical solution was to recode values into
diff variable...thanks again!! It works really fine!

2008/12/17 Rodrigo Briceño <rjbriceno@gmail.com>:
> Nick, after trying your solution I discovered that instead of the
> values 1=july-august 2002, 2=sep-oct 2002, 3=mar-apr 2004, 4=jul-aug
> 2004, 5=sep-oct 2004, and 6=nov-dic 2004, I have the values 16, 17,
> 20, 21, 22, 23. In that case I changed your commands in this way:
>
> gen year0 = cond(phase < 20, 2002, 2004)
>
> The doubt here is which values corresponds to the second and third
> lines of command:
>
> gen bimester0 = cond(phase < 3, phase + 3, cond(phase == 3, 2, phase))
> (do I need to change the 3 for 20?, not sure about it
>
> gen mytime = 6 * (year - year0) + (bimester - bimester0) + 1
>
> any help is appreciated.
>
>
>> Nick
>> n.j.cox@durham.ac.uk
>>
>> By the way, Rodrigo: You started a thread on 4 December
>>
>> <http://www.hsph.harvard.edu/cgi-bin/lwgate/STATALIST/archives/statalist.0812/date/article-221.html>
>>
>> -- and David Elliott and I posted various replies, raising subsidiary questions, but I never saw any reply from you.
>>
>> Rodrigo Briceño
>>
>> I need to calculate the amount of bimesters a
>> household stay in a program. For that purpose I have three different
>> variables:
>> 1. Phase of incorporation (phase): it has 6 numeric values where
>> 1=july-august 2002, 2=sep-oct 2002, 3=mar-apr 2004, 4=jul-aug 2004,
>> 5=sep-oct 2004, and 6=nov-dic 2004
>> 2. Two variables that contain the information about the time the
>> household dropped the program:
>> 2. 1 Year: from 2002 to 2008
>> 2. 2 bimester: from 1 to 6
>>
>> In what way can I calculate the amount of bimesters (or months) that a
>> household stayed in the program? Example above (time is the variable
>> which values I need):
>>
>> HH  phase  year    bimester  time
>> 1      3         2007       2         19 (or 38 months)
>> 2      1         2004       1          10 (or 20 months)
>>
>>
>> *
>> *   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/
>>
>
>
>
> --
> Rodrigo Briceño
> Economist
> +506  22-91-12-00 ext. 113   Office
> +506  22-32-08-30                Fax
> +506  88-86-11-77                Cell
> rjbriceno@gmail.com
> rjavierb@racsa.co.cr
>
> MSN: jbric98@hotmail.com
> SKYPE: rbriceno1087
>



-- 
Rodrigo Briceño
Economist
+506  22-91-12-00 ext. 113   Office
+506  22-32-08-30                Fax
+506  88-86-11-77                Cell
rjbriceno@gmail.com
rjavierb@racsa.co.cr

MSN: jbric98@hotmail.com
SKYPE: rbriceno1087

*
*   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/



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