Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | obba0001 <oben.bayrak@slu.se> |
To | statalist@hsphsun2.harvard.edu |
Subject | st: panel data daily data, missing days, how to fill it up to full months(1-31) |
Date | Fri, 7 Feb 2014 04:07:17 -0800 (PST) |
In my panel data, some people have recorded between 1-25 days of the month. some recorded from 3 to 31 days of the month. In addition to this, some of them are not measured for the same month, so in some months which there are 31 days and for some months there are 30 days. what i want is to create those missing days then i will do MI impute, but first i need to make the data ready for imputation. i used tsset to give you more information about my data: panel variable: id (unbalanced) time variable: day, 18aug2005 to 06jul2008 delta: 1 day i tried tsfill with the full option but it didnt work. the message i got is: timevar (day) may not contain missing values when option full is specified i looked for that error but didnt understand how to modify the data in order to make this command work. I am a newbie, so i need your help. further information as requested: The desired pattern is to measure the people for a complete month. there are people that are measured full month such as from 1 to 31th of that month. but there are some people that are measured between 1 to 16 or 1-25 or 1-5th of the month. Another property of my data is that the experiment was done between 2005 to 2008. So people were not measured at the same period. for example, some people recorded between 1th of september 2005 to 26th of september 2005 and some recorded between 5th of november 2006 to 31 december 2006. What I want is for example for the person who have measured between 1th to 25th november, I want to create rows that have 25th,27th,28th, 29th,30th under the date coloumn and under the id coloumn the id should be same such as 1 for each created day, and i want to copy the demographic variables to that produced rows. but the dependent variable should include na since there is no data for the dependent variable for those days for the given person. After completing this step I will do multiple imputation to produce those dependent variables. Kind regards -- View this message in context: http://statalist.1588530.n2.nabble.com/panel-data-daily-data-missing-days-how-to-fill-it-up-to-full-months-1-31-tp7580479.html Sent from the Statalist mailing list archive at Nabble.com. * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/faqs/resources/statalist-faq/ * http://www.ats.ucla.edu/stat/stata/