Here's some sample code (you may have to modify) to deal with the
scores another way, I think. Set the whole scale to vary between 0
and 1, and then do a logit transformation, which AmII can also deal
with. (This is mostly to get around the way you're dealing with 0
values.)
Instead of taking 0 to be 0.1, you can add the infinitesimally small
value (R has a super-tiny value that's almost but not quite zero) to
zero and subtract it from your maximum value.
yourvarsofinterest <- XXX
for(i in yourvarsofinterest) {
data[,i] <- ifelse(data[,i] >= 100, 1 - .Machine$double.eps,
ifelse(data[,i] <= 0, .Machine$double.eps,
data[,i] / 100))
}
And to transform back (assuming five imputed sets, etc.):
for(j in 1:5)
for(i in yourvarsofinterest) {
outdata0[[j]][,i] <- outdata0[[j]][,i] * 100
}
-Nathan
On 2 Apr 2008, at 10:59 AM, Qian Guo wrote:
Thank you, Gary. I changed about 100 zeros to 0.1 and
took the log.
Now both the subgroup and the "other" distribution are right skewed.
The subgroup looks a little better: the bulk looks almost normal but
it has a VERY long left tail.
And I'm still concerned if imputations for the subgroup will be
affected by the higher scores in the "other." Is setting mean and SE
for the subgroup enough to take care of that?
Qian
On Wed, 2 Apr 2008 10:37:35 -0400 (EDT)
Gary King <king(a)harvard.edu> wrote:
why don't you try taking the log before
imputation.
Gary
On Wed, 2 Apr 2008, Qian Guo wrote:
> Hi Amelia folks,
>
> I have a question about imputing for highly skewed distributions.
> My data have missing test scores for 540 out of 709 observations
> in a lower-achieving subgroup and no missing scores for the other
> students (about 129,000 in size). The problem is that the subgroup
> has a highly left skewed distribution while the overall
> distribution is highly right skewed.
>
> I set priors by giving the mean (16.07 out of 40, versus 31.68 for
> the other students) and standard deviation (9.30 vs. 7.20) of the
> subgroup. But would it still be a problem that the subgroup
> distribution is highly left skewed (and so unlike the rest of the
> population)? Thanks a lot.
>
> All very best,
> Qian Guo
> -
> Amelia mailing list served by Harvard-MIT Data Center
> [Un]Subscribe/View Archive:
http://lists.gking.harvard.edu/?info=amelia
>
-
Amelia mailing list served by Harvard-MIT Data Center
[Un]Subscribe/View Archive:
http://lists.gking.harvard.edu/?
info=amelia
----------
Nathan A. Paxton
Ph.D. Candidate
Dept. of Government, Harvard University
Resident Tutor
John Winthrop House, Harvard University
napaxton AT fas DOT harvard DOT edu
http://www.fas.harvard.edu/~napaxton
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
========================================================================
When you have to stay eight years away from California, you live in a
perpetual state of homesickness.
- Ronald Reagan
The most courageous act is still to think for yourself. Aloud.
-Coco Chanel
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
========================================================================