Dear Ms. Janz,
There was an error in one of the checking routines we use in Amelia to see if there are
any problems in the data that can be preempted. I fixed the error and it will be changed
in the next Amelia release. In the meantime, you can avoid this issue by turning off the
checking routines as an option in the amelia() call with the "incheck"
argument.
In your example, this would be:
amelia.out <- amelia(n, m=5, ts="year", incheck=FALSE,
cs="country",intercs=TRUE,polytime=1,logs=vlogs)
Thanks for your help in finding this error and making your data available so we could
resolve it.
Best,
James.
--
James Honaker, Senior Research Scientist
//// Institute for Quantitative Social Science, Harvard University
________________________________________
From: amelia-bounces(a)lists.gking.harvard.edu [amelia-bounces(a)lists.gking.harvard.edu] On
Behalf Of N. Janz [nj248(a)cam.ac.uk]
Sent: Thursday, January 03, 2013 4:31 PM
To: amelia(a)lists.gking.harvard.edu
Cc: nicolejanz(a)gmail.com
Subject: [amelia] Problem with logs
Dear all, Amelia works fine when I do NOT specify any variables that should
be logged. As soon as I include logs, I get an error ("#Error in
matrix(unlist(value, recursive = FALSE, use.names = FALSE), nrow = nr, :
negative extents to matrix"). I checked that the variables to log can be
logged (no negative/zero values). I'm grateful for any hints. Best, Nicole
--Rcode--
#load MI package
require(Amelia)
set.seed(1000)
#load data set
load(url("http://schreiberin.de/nicole.Rdata"))
n <- nicole
dim(n) #3822 59
class(n) #"data.frame"
# Declare variables to be logged vlogs <- c("GDP_const2000" ,
"GDP_curr"
,"population" , "lifeexp" ,"infmortality" ,"trade"
, "l_US_fdi_total" ,
"l_US_fdi_petrol" , "l_US_fdi_total_manuf","l_US_fdi_food"
,
"l_US_fdi_chemical" , "l_US_fdi_prim_fab_metal"
,"l_US_fdi_machinery",
"l_US_fdi_electrical" , "l_US_fdi_transport"
,"l_US_fdi_whole_trade",
"l_US_fdi_depository" ,
"l_US_fdi_finance_except" ,"l_US_fdi_mining" ,
"l_WB_FDI_percentGDP" ,
"l_WB_FDI_curr" , "l_UN_FDI_flow" , "l_UN_FDI_flow_pgdp" ,
"l_UN_FDI_stock", "l_UN_FDI_stock_pgdp" )
amelia.out <- amelia(n, m=5, ts="year",
cs="country",intercs=TRUE,polytime=1,logs=vlogs) #Error in
matrix(unlist(value, recursive = FALSE, use.names = FALSE), nrow = nr, :
negative extents to matrix
--END Rcode--
--
Nicole Janz, PhD Cand.
Lecturer at Social Sciences Research Methods Centre 2012/13
University of Cambridge
Department of Politics and International Studies
www.nicolejanz.de | nj248(a)cam.ac.uk | Mobile: +44 (0) 7905 70 1 69 4
Skype: nicole.janz
--
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(a)lists.gking.harvard.edu
To unsubscribe from this list or get other information:
https://lists.gking.harvard.edu/mailman/listinfo/amelia