Hi all,
I was wondering if there was another way for me to download the Amelia II
package. Right now I'm trying the following code
install.packages("Amelia", repos = "http://gking.harvard.edu")
But I get the following error
Warning: unable to access index for repository
http://gking.harvard.edu/bin/macosx/universal/contrib/2.7
Warning message:
package ?Amelia? is not available
Without Amelia II I really can't do the type of imputation I was hoping for
so I was wondering if someone had any recommendations. (It also doesn't work
on school computers).
Hopeless,
Ashley Anderson
Also, I am doing an imputation that "fills in" roughly 2000 data points but
its only takes 3 iterations to converge. I thought I was doing something
wrong but according to my Amelia output the amelia run achieved normal EM
convergence. Can anyone explain this anomaly?
-Ashley Anderson
On 4/26/10 12:37 PM, "Gary King" <king at harvard.edu> wrote:
> right. its the mac issue...
> Gary
> ---
> http://gking.harvard.edu
>
>
>
>
> On Mon, Apr 26, 2010 at 12:29 PM, Michael Barnett <mlbarnett at gmail.com> wrote:
>> Ashley,
>>
>> You should be able to install it by just typing
>> install.packages("Amelia")
>>
>> -Michael
>>
>> On Apr 26, 2010, at 12:26 PM, Ashley Anderson wrote:
>>
>>> Hi all,
>>>
>>> I was wondering if there was another way for me to download the
>>> Amelia II
>>> package. Right now I'm trying the following code
>>>
>>> install.packages("Amelia", repos = "http://gking.harvard.edu")
>>>
>>> But I get the following error
>>>
>>> Warning: unable to access index for repository
>>> http://gking.harvard.edu/bin/macosx/universal/contrib/2.7
>>> Warning message:
>>> package ?Amelia? is not available
>>>
>>>
>>> Without Amelia II I really can't do the type of imputation I was
>>> hoping for
>>> so I was wondering if someone had any recommendations. (It also
>>> doesn't work
>>> on school computers).
>>>
>>> Hopeless,
>>> Ashley Anderson
>>>
>>>
>>> _______________________________________________
>>> gov2001-l mailing list
>>> gov2001-l at lists.fas.harvard.edu
>>> http://lists.fas.harvard.edu/mailman/listinfo/gov2001-l
>>
>> _______________________________________________
>> gov2001-l mailing list
>> gov2001-l at lists.fas.harvard.edu
>> http://lists.fas.harvard.edu/mailman/listinfo/gov2001-l
>>
> _______________________________________________
> gov2001-l mailing list
> gov2001-l at lists.fas.harvard.edu
> http://lists.fas.harvard.edu/mailman/listinfo/gov2001-l
>
Dear all,
In my article, the author uses corrects for autocorrelation using an AR1
process, indicating (I believe) that the data are autocorrelated with a lag
of 1. For imputation, does this mean that we set the time polynomial to a
higher order or does this mean that we need to lag variables (which doesn't
seem right). I just want to make sure that my imputation is keeping with the
non-randomness in the data given autocorrelation in the original dataset.
-Ashley Anderson
We are trying to model lme (mixed effect) with imputed data from Amelia. We
calculated the averaged coefficients and standard errors obtained from five
datasets, but don't know how to average the model fits (AIC, BIC, or
-2loglikelihood) and random effect variances. I guess we can use the
standard error formula for the random effect variance (right?) but how about
the model fit estimates? Does anybody have a idea?
P.S: there is a typo in the section note about Amelia. Under the title
"combining estimates from the M datasets", Sq2 should be sum of (qj-qhat)^2
instead of (qj-qhat^2)
Thanks!
Hi everyone,
If we use fixed effects model, we assume that there could be an omitted variable causing potential bias we cannot estimate. As I understand it that's why we use fixed effects model.
Missing data cannot then be imputed, because we cannot assume that it is missing at random. Otherwise, the assumption behind EM algorithm and fixed effects model would conflict.
That is how I understood what Iain said in the last section. Maybe I got it wrong. Do we just ignore missing data in that case, or is there a procedure that can enable us to tackle this problem?
Nino Malekovic
MPA Candidate, Class 2011
Harvard Kennedy School
________________________________________
From: gov2001-l-bounces at lists.fas.harvard.edu [gov2001-l-bounces at lists.fas.harvard.edu] On Behalf Of gov2001-l-request at lists.fas.harvard.edu [gov2001-l-request at lists.fas.harvard.edu]
Sent: Sunday, April 25, 2010 3:18 PM
To: gov2001-l at lists.fas.harvard.edu
Subject: gov2001-l Digest, Vol 57, Issue 29
Send gov2001-l mailing list submissions to
gov2001-l at lists.fas.harvard.edu
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.fas.harvard.edu/mailman/listinfo/gov2001-l
or, via email, send a message with subject or body 'help' to
gov2001-l-request at lists.fas.harvard.edu
You can reach the person managing the list at
gov2001-l-owner at lists.fas.harvard.edu
When replying, please edit your Subject line so it is more specific
than "Re: Contents of gov2001-l digest..."
Today's Topics:
1. Bounding in Amelia (Ashley Anderson)
2. Bounding errors (Ashley Anderson)
3. Re: Bounding errors (Gary King)
4. Memory Limit with R's fixed effects with probit.gee (Gabriel Chan)
5. Re: Memory Limit with R's fixed effects with probit.gee
(Gary King)
6. RD as first stage in 2SLS (Matthew Kraft)
7. Matching (Han He)
8. Re: Matching (Gary King)
----------------------------------------------------------------------
Message: 1
Date: Sun, 25 Apr 2010 12:39:18 -0400
From: Ashley Anderson <aaanders at fas.harvard.edu>
Subject: [gov2001] Bounding in Amelia
To: Class List for Gov 2001/E-2001 <gov2001-l at lists.fas.harvard.edu>
Message-ID: <C7F9E876.12A7F%aaanders at fas.harvard.edu>
Content-Type: text/plain; charset="US-ASCII"
Hello All,
I had a question about setting bounds in Amelia: if you wanted the imputed
numbers to be strictly positive, I know you would set a lower bound to 0,
but how would you specify the upper bound (there wouldn't be one).
-Ashley Anderson
------------------------------
Message: 2
Date: Sun, 25 Apr 2010 13:20:04 -0400
From: Ashley Anderson <aaanders at fas.harvard.edu>
Subject: [gov2001] Bounding errors
To: Class List for Gov 2001/E-2001 <gov2001-l at lists.fas.harvard.edu>
Message-ID: <C7F9F206.12A82%aaanders at fas.harvard.edu>
Content-Type: text/plain; charset="us-ascii"
I figured out the first question but now I'm getting an error with my
bounding matrix. This is what I have:
row1 <- c(5,0,100000)
row2 <- c(6,0,100000)
row3 <- c(7,0,100000)
row4 <- c(8,0,100000)
row5 <- c(9,0,100000)
grr <- matrix(rbind(row1, row2, row3, row4, row5), ncol=3, nrow=5)
bds <- grr
a.out <- amelia(data, m=5, ts="year", cs="cty", idvars = c("id", "id2"),
bounds=bds, max.resample = 100000)
I was pretty sure that this was how you set up a bounds matrix (it tells
amelia that columns 5,6,7,8, and 9 should be bounded from 0 to 100000), but
I keep getting this error:
Error in matrix(NA, nrow = AMn.ss, ncol = AMp) :
non-numeric matrix extent
Does anyone know what I could be doing wrong?
-Ashley Anderson
I figured out the first question but now I'm getting an error with my
bounding matrix. This is what I have:
row1 <- c(5,0,100000)
row2 <- c(6,0,100000)
row3 <- c(7,0,100000)
row4 <- c(8,0,100000)
row5 <- c(9,0,100000)
grr <- matrix(rbind(row1, row2, row3, row4, row5), ncol=3, nrow=5)
bds <- grr
a.out <- amelia(data, m=5, ts="year", cs="cty", idvars = c("id", "id2"),
bounds=bds, max.resample = 100000)
I was pretty sure that this was how you set up a bounds matrix (it tells
amelia that columns 5,6,7,8, and 9 should be bounded from 0 to 100000), but
I keep getting this error:
Error in matrix(NA, nrow = AMn.ss, ncol = AMp) :
non-numeric matrix extent
Does anyone know what I could be doing wrong?
-Ashley Anderson
Hey,
I am using MatchIt to reduce model dependency. I matched on change in
GDP, developed/undeveloped, new democracy/old democracy, etc. leaving
the treatment as government budget deficit. However, GDP is still
significant in my regression. Why does this happen? Shouldn't matching
isolate the treatment variable? Thanks!
Best,
Han
Harvard College Class of 2013
614-329-1324
Hi All,
We are using a regression discontinuity design to estimate effect of the
passage of a school bond to reduce class size on actual class sizes. This
gives us plausibly exogenous variation in class size.
We are wondering how we might be able to use these predicted values (the
exogenous part of class size) to then estimate the effects of class size
reduction on student achievement.
I have never seen a two stage least squares where your instrument in the
first stage comes from a regression discontinuity. I know if we simply use
the predicted values from the first stage and plug them into the second
stage as our class size variable then we have to adjust the standard errors
of the second stage equation but I don't know how to do that. It is also
unclear to me if we would need to include the same control terms from the RD
design in the second stage where we regress student achievement on class
size.
Any insights would be greatly appreciated.
matt
> _______________________________________________
> gov2001-l mailing list
> gov2001-l at lists.fas.harvard.edu
> http://lists.fas.harvard.edu/mailman/listinfo/gov2001-l
>
>
--
Matthew Kraft
Doctoral Candidate
Quantitative Policy Analysis
Harvard Graduate School of Education
Hi All,
We're running into some memory limitations in R that we're hoping to work
around. Our data has 15,000 observations and we are trying to run the
probit.gee model to find clustered standard errors. Everything works fine in
our models that just have a few covariates. However, when we try to run the
model with country fixed effects (there are 43 countries in the dataset) we
get an error message: "Error: cannot allocate vector of size 34 Kb" We
played around with the model and just included fixed effects for 32 of the
43 countries and got no error message. Any more than 32 countries and the
error comes back -- so we are only barely exceeding R's memory capabilities.
Also, the model works fine when we use vanilla probit, only probit.gee is
giving this problem. Also note that we have already used the command
memory.limit(size = 4000) -- which is the maximum, I believe.
If anyone has an idea for a workaround we'd love to hear it. Otherwise, I
think we're going to be stuck calculating our coefficients in R and having
to calculate our standard errors in Stata.
Thanks!
-Gabe and Tara
--
gc
Hello All,
I had a question about setting bounds in Amelia: if you wanted the imputed
numbers to be strictly positive, I know you would set a lower bound to 0,
but how would you specify the upper bound (there wouldn't be one).
-Ashley Anderson