so you have n=164 and 4 time points.  that's TSCS data, but you don't have many time points.  a polynomial fit to 4 time points won't help much; you could probably include a linear term (that's n=4 with a slope and intercept estimated, so much much degrees of freedom left), but that's certainly all.  probably better to consider the 4 time points as separate variables without the time component, at least at first.
Gary
---
http://gking.harvard.edu



On Wed, Jan 13, 2010 at 4:20 PM, Peter Flom <peterflomconsulting@mindspring.com> wrote:
Hi again

I am making some progress.... but...

My data set has data on 164 women, each measured at 4 time points.

The DV is number of unprotected sexual acts in last 3 months.  Since this is a data set of commercial sex workers, this variable is highly skewed.

The IVs are age, marital status, highest grade of school, and income.

Marital status is (naturally) nominal.  The others are numeric.

When I run
susanMI.out <- amelia(susan2, m = 5, ts = "time", noms = "married",   cs = 'id',
                    intercs = T,
                    sqrts = "unprot_vag_sex",
                    polytime = 0)

I get warnings about noninvertible matrices and highly colinear variables - but none are that highly colinear.

If I run without the polytime option, I get no errors, and the overall distribution of the variables is pretty good, but the distribution within people is not good at all.  That is, running

tscsPlot(susanMI.out, cs =2, var = "unprot_vag_sex")

shows that where the DV is missing, the imputed values aren't even close to the (admittedly high) value where it is present.  In this case, only one value was present.


But for woman number 8, three values were present, all were 0, but the imputed value for the missing time was about 35, and the range was 0 to over 100.

Add lags = "unprot_vag_sex" and leads = "unprot_vag_sex", made the range much smaller, but the values were still very far off.

I had thought that polytime = 0 would set constant values ... but it led to the errors above.


Thanks in advance for any help and sorry to be so long winded, but I thought all these details would matter

Peter




Peter L. Flom, PhD
Statistical Consultant
Website: http://www DOT statisticalanalysisconsulting DOT com/
Writing; http://www.associatedcontent.com/user/582880/peter_flom.html
Twitter:   @peterflom
-
Amelia mailing list served by Harvard-MIT Data Center
[Un]Subscribe/View Archive: http://lists.gking.harvard.edu/?info=amelia
More info about Amelia: http://gking.harvard.edu/amelia