Hi Matt,
Thanks again for your help. I am running another issue with Amelia
imputation and I hope you can point me to the right direction.
I am using Amelia to impute historical CCP party membership and
population at the county level. I have used the following Amelia
imputation comments, which has specified the TSCS structure and added
lags and leads as well as the squared terms to improve the imputation
results.
a.out=amelia(data, m = 10, idvars = c("province", "prefecture",
"county", "prov_id", "pref_id", "sgn_base2",
"js_base2", "jcj_base2",
"base1", "base2"), ts = "year", cs = "county_id",
empri = 100, lags =
c("population", "ccp_member"), leads = c("population",
"ccp_member"),
logs = c("population", "ccp_member","population_sq",
"ccp_member_sq",
"ccp_branch", "ccp_comission","ccp_branch_sq",
"ccp_comission_sq"),
polytime=2, incheck = TRUE, max.resample = 1000, tolerance = 0.01)
However, the imputed data has very high variance across different years,
which defy the patterns that we should have observed in non-missing data.
For example, the original party membership with missing value sand the
imputed values for one county looks like the following:
Year Original Imputed
1938 75 75
1939 588 588
1940 25.15989
1941 29.70148
1942 17.14454
1943 5.593282
1944 35.50387
1945 288.5483
1946 248.8093
1947 82.34441
1948 124.5035
1949 358 358
What worries me is that the imputed party membership jumps up and down
so much between 1940 and 1948. I have seen other counties with complete
time trend data, I don't think the imputed values in this case are in
any way close to the reality. What I can do to smooth the time trend for
the imputed values? Any suggestions would be much appreciated.
Meanwhile, I have also an unrelated question: how can I only analyze a
subset of the imputed data? The "subset" command seems to be
incompatible with imputed dataset, as I cannot use the following command
"a.out.1945 <- subset(a.out$imputations$year<=1945)"
Thanks a ton in advance!
Best,
Xiaobo
--
Xiaobo Lü
Associate Professor
Department of Government
University of Texas at Austin
Tel: (512) 232-7257
Fax: (512) 471-1061
Website:
www.xiaobolu.com