Antonio P. Ramos

2008-Sep-19 05:01 UTC

### [R] problems with too many NA in the function ideal() from pscl package.

Hi all, I'm trying to run some monte carlo simulation for my roll call data using the ideal() function, which resides in the pscl package. However, I'm receiving an error message that I don't understand. Error in ideal(a, maxiter = 1000, thin = 10, burnin = 50, store.item = TRUE, : NA/NaN/Inf in foreign function call (arg 13) my code is simple the following:> m_a <- ideal(a, maxiter = 1000, thin = 10, burnin = 50,+ store.item = TRUE, normalize=T, + priors=list(xp=1e-12,xpv=1e-12,bp=1e-12,bpv=1e-12), verbose=T) ideal: analysis of roll call data via Markov chain Monte Carlo methods. Subsetting rollcall object a using dropList Using the following codes to represent roll call votes: Yea: 1 Nay: 0 Abstentions: NA Not In Legislature: 9 Ideal Point Estimation Number of Legislators 30 Number of Items 1172 checking for any user-supplied priors... checking start values... will use eigen-decomposition method to get start values for ideal points...done running 1172 vote-specific probit GLMs for start values for item/bill parameters conditional on start values for ideal points...done using the following start values for ideal points (summary follows): V1 Min. :-0.7573 1st Qu.:-0.1583 Median : 0.0000 Mean :-0.0342 3rd Qu.: 0.0000 Max. : 0.8160 using the following start values for item parameters (summary follows): V1 V2 Min. :-131.2397 Min. :-49.27293 1st Qu.: -1.9090 1st Qu.: -1.33518 Median : -1.5156 Median : -0.34876 Mean : 0.5443 Mean : -0.07001 3rd Qu.: 1.6978 3rd Qu.: 1.22064 Max. : 553.5285 Max. : 65.19820 NA's : 573.0000 Starting MCMC Iterations... Error in ideal(a, maxiter = 1000, thin = 10, burnin = 50, store.item = TRUE, : NA/NaN/Inf in foreign function call (arg 13) + The problem, I think, is that many data matrix has too many NA. Does anybody have any suggestion? Thanks in advance, Antonio.