Hi Francesco, 

It seems as though your data are currently in "wide" format, but Amelia usually takes data in "long" format (where each row is a unit-year, as opposed to each row being one unit). In the wide format, Amelia will actually use 37 and 39 to impute 38, since each of those is a variable in the dataset. If you convert to long format, you will have to set the "ts" and "cs" arguments in order to include the time-series information. 

You can see some information on how to reshape your data in the following question from Stack Exchange:

http://stats.stackexchange.com/questions/7439/how-to-change-data-between-wide-and-long-formats-in-r

Hope that helps!

Cheers,
matt.

On Mon, Oct 1, 2012 at 12:13 PM, Francesco Giudici <fg2296@tc.columbia.edu> wrote:
Dear Amelia Users and Developers,
I just started to use Amelia II to impute missing values a longitudinal dataset. I have a specific question about that and would like to know if you could help me to understand what is the correct way to impute the data in my case. My data are really simple: units are individuals with ID, gender, race, years of education, etc. and the income per hour for every year between age 30 and age 50. I would like to impute the missing values on the income per hour. I tried to impute the data already but it seems that the imputed values do not take into consideration prior and later observations. For example, if income at age 38 is missing, I would like to impute a value based on the income at age 37 and age 39, which is not the case for the moment.

On this topic, I also found this post on a blog:

http://stats.stackexchange.com/questions/12873/multiple-imputation-for-missing-count-data-in-a-time-series-from-a-panel-study/37983#37983

but I am not sure if this correspond to my situation. The imputation I made was with the format I had (one line - one unit: first line = ID 1, income.age.30, income.age.31, ...; second line = ID 2, income.age.30, income.age.31...). Attached to this email you will find an extract of the data under this form. Based on this post, If I understood it correctly, I have to create a times series variables and transpose the same individual on different lines (e.g. first line = ID 1, income.age.30, income.age.31; second line = ID 1, income.age.30, income.age.31, ...). But I am not really sure about that.

I will be happy if you could give me an advice or if you could tell me if the topic where already discussed in this mailing list.

Thank you very much!

Best wishes,
Francesco Giudici



--
Francesco Giudici
Postdoctoral Fellow
Teachers College, Columbia University
New York, NY 10027
fg2296@columbia.edu


--
Francesco Giudici
Postdoctoral Fellow
Teachers College, Columbia University
New York, NY 10027
fg2296@columbia.edu


--
Amelia mailing list served by HUIT
[Un]Subscribe/View Archive: http://lists.gking.harvard.edu/?info=amelia
More info about Amelia: http://gking.harvard.edu/amelia
Amelia mailing list
Amelia@lists.gking.harvard.edu

To unsubscribe from this list or get other information:

https://lists.gking.harvard.edu/mailman/listinfo/amelia