Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: Replacing the missing observations


From   [email protected]
To   [email protected]
Subject   st: Replacing the missing observations
Date   Tue, 15 Nov 2011 18:34:29 -0500

Dear All,


group	time	ewportret	ewdiffret

0	2007m4	.041679	             .
1	2007m4	.0375245	-.0041545
0	2007m5	.0449738	     .
1	2007m5	.0397919	-.0051819
0	2007m6	-.0240277	     .
1	2007m6	-.0188678	.0051599

The variable ewdiffret is the difference in ewportret between group 1 and 
group 0 for each time variable (thanks to Dr. Cox for the help with this). My 
question is how can i now replace all empty cells under the ewdiffret in the 
same month with the single ewdiffret value in that given month. Indeed i have 
too many empty cells in a given month and i want to replace them all with the 
single ewdiffret i have for that month.

For example: I would like to have the first empty cell under ewdiffret equal 
to -.0041545 as the time variable for both is 2007m4 and the second 
empty cell equal to -.0051819 as their time variable is 2007m5. Using too 
many replace functions takes a long time and may cause transcription errors.

Thank you,

Gokhan


*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index