How to debug this problem? And why it has different bugs for Mac OS and Windows OS?

330 views
Skip to first unread message

Jiaqi Zhang

unread,
Jan 15, 2016, 1:25:10 PM1/15/16
to Stan users mailing list

Hi, All,

I am pretty new to Stan language although I used to have some experience in WinBUGs, but I am still learning the Stan language in R, with RStan.

Here is my detailed problem:

I am trying to examine guessing as a student characteristic in Rasch model. Rather than assuming guessing is an item parameter and is a constant across all student, I assume, more realistic, that guessing varies based on students' latent ability --- the higher the ability, the less chance for guessing. Then whether student answer one particular item correctly, is the weighted combination of guessing and their ability:

Bernoulli (gurssing_j*1/k + (1-guessing_j)*(exp(theta_j - item.diff_i)/(1+exp(theta_j - item.diff_i)))

where i is the number of items, and j is the number of students.

I generated the data in the way that I proposed [In the attached R file, line 23 - 75 is the function that I generated the data], and want to analysis the data. I think this model cannot be analyzed in traditional IRT models, because now guessing is now at the student side. Then I am trying to analysis the data with Rstan using the Bayesian approach.

So I write my model in Stan language, and try to compile it. At a start point, I started with simplest prior distribution for all parameters, and the model:

for(i in 1:n_student)
  {
    for (j in 1:n_item)
      {
        y[i,j] ~ bernoulli(guessing[i]*.2+(1-guessing[i])*inv_logit(theta[i] - item_diff[j]));
      }
  }
}

The Rstan model is actually compiled, but there is no samples when I am calling it. And I tried the same code in R on both Mac OS and Windows OS, and it turns out two different problem, but both of them has no sampling in the chain.

For R in Windows OS:

The model is compiled and actually run, no error message, but the model contains no samples. The message shows in the console is (with sessionInfo):

> fit_3pl <- stan(model_code = code_mm, data = init, iter = 2000, chains = 1)

SAMPLING FOR MODEL 'a9de5b0d567a006cf80adb5bae39f3d8' NOW (CHAIN 1).
 [1] "Rejecting initial value:"                                                                                                              
 [2] "  Error evaluating the log probability at the initial value."                                                                          
 [3] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
 [4] "Exception thrown at line 25: stan::math::bernoulli_log: Probability parameter is -0.406224, but must be between (0, 1)"                
 [5] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
 [6] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
 [7] "Rejecting initial value:"                                                                                                              
 [8] "  Error evaluating the log probability at the initial value."                                                                          
 [9] "Initialization between (-2, 2) failed after 100 attempts. "                                                                            
[10] " Try specifying initial values, reducing ranges of constrained values, or reparameterizing the model."                                 
[1] "error occurred during calling the sampler; sampling not done"
> proc.time() - star
   user  system elapsed 
   1.23    0.06   57.49 
> fit_3pl
Stan model 'a9de5b0d567a006cf80adb5bae39f3d8' does not contain samples.

For more information, please see the attached IRT_Windows_OS.R file.

> sessionInfo()
R version 3.2.2 (2015-08-14)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] rstan_2.8.0   ggplot2_1.0.1 Rcpp_0.12.1   mvtnorm_1.0-3

loaded via a namespace (and not attached):
 [1] codetools_0.2-14 digest_0.6.8     MASS_7.3-44      grid_3.2.2       plyr_1.8.3       gtable_0.1.2     stats4_3.2.2     magrittr_1.5     scales_0.3.0     stringi_1.0-1   
[11] reshape2_1.4.1   proto_0.3-10     tools_3.2.2      stringr_1.0.0    munsell_0.4.2    inline_0.3.14    colorspace_1.2-6 gridExtra_2.0.0 

For R in Mac OS:

The console returns a more crazy message with only one line of error message (with sessionInfo), for more information, please see the attached IRT_Mac_OS.R file:

> star <- proc.time()
> #set_cppo(mode = "debug")
> fit_3pl <- stan(model_code = code_mm, data = init, iter = 2000, chains = 1)
clang: warning: optimization flag '-ffat-lto-objects' is not supported
clang: warning: argument unused during compilation: '-ffat-lto-objects'

SAMPLING FOR MODEL '3d8fca4d9b3c657abf5a65e146670733' NOW (CHAIN 1).
  [1] "Error : "                                                                                                                              
  [2] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
  [3] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is -0.144568, but must be between (0, 1)"                
  [4] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
  [5] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
  [6] "Rejecting initial value:"                                                                                                              
  [7] "  Error evaluating the log probability at the initial value."                                                                          
  [8] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
  [9] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is 1.87755, but must be between (0, 1)"                  
 [10] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
 [11] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
 [12] "Rejecting initial value:"                                                                                                              
 [13] "  Error evaluating the log probability at the initial value."                                                                          
 [14] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
 [15] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is -0.0211564, but must be between (0, 1)"               
 [16] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
 [17] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
 [18] "Rejecting initial value:"                                                                                                              
 [19] "  Error evaluating the log probability at the initial value."                                                                          
 [20] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
 [21] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is 1.07851, but must be between (0, 1)"                  
 [22] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
 [23] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
 [24] "Rejecting initial value:"                                                                                                              
 [25] "  Error evaluating the log probability at the initial value."                                                                          
 [26] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
 [27] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is 1.78473, but must be between (0, 1)"                  
 [28] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
 [29] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
 [30] "Rejecting initial value:"                                                                                                              
 [31] "  Error evaluating the log probability at the initial value."                                                                          
 [32] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
 [33] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is -0.165628, but must be between (0, 1)"                
 [34] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
 [35] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
 [36] "Rejecting initial value:"                                                                                                              
 [37] "  Error evaluating the log probability at the initial value."                                                                          
 [38] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
 [39] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is 1.09169, but must be between (0, 1)"                  
 [40] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
 [41] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
 [42] "Rejecting initial value:"                                                                                                              
 [43] "  Error evaluating the log probability at the initial value."                                                                          
 [44] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
 [45] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is -0.0460136, but must be between (0, 1)"               
 [46] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
 [47] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
 [48] "Rejecting initial value:"                                                                                                              
 [49] "  Error evaluating the log probability at the initial value."                                                                          
 [50] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
 [51] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is 1.23847, but must be between (0, 1)"                  
 [52] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
 [53] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
 [54] "Rejecting initial value:"                                                                                                              
 [55] "  Error evaluating the log probability at the initial value."                                                                          
 [56] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
 [57] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is -0.304645, but must be between (0, 1)"                
 [58] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
 [59] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
 [60] "Rejecting initial value:"                                                                                                              
 [61] "  Error evaluating the log probability at the initial value."                                                                          
 [62] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
 [63] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is 1.09657, but must be between (0, 1)"                  
 [64] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
 [65] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
 [66] "Rejecting initial value:"                                                                                                              
 [67] "  Error evaluating the log probability at the initial value."                                                                          
 [68] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
 [69] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is 1.84307, but must be between (0, 1)"                  
 [70] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
 [71] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
 [72] "Rejecting initial value:"                                                                                                              
 [73] "  Error evaluating the log probability at the initial value."                                                                          
 [74] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
 [75] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is 1.23891, but must be between (0, 1)"                  
 [76] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
 [77] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
 [78] "Rejecting initial value:"                                                                                                              
 [79] "  Error evaluating the log probability at the initial value."                                                                          
 [80] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
 [81] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is 1.04192, but must be between (0, 1)"                  
 [82] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
 [83] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
 [84] "Rejecting initial value:"                                                                                                              
 [85] "  Error evaluating the log probability at the initial value."                                                                          
 [86] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
 [87] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is -0.0759067, but must be between (0, 1)"               
 [88] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
 [89] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
 [90] "Rejecting initial value:"                                                                                                              
 [91] "  Error evaluating the log probability at the initial value."                                                                          
 [92] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
 [93] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is 1.51935, but must be between (0, 1)"                  
 [94] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
 [95] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
 [96] "Rejecting initial value:"                                                                                                              
 [97] "  Error evaluating the log probability at the initial value."                                                                          
 [98] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
 [99] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is -0.203562, but must be between (0, 1)"                
[100] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[101] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[102] "Rejecting initial value:"                                                                                                              
[103] "  Error evaluating the log probability at the initial value."                                                                          
[104] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[105] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is -0.0408336, but must be between (0, 1)"               
[106] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[107] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[108] "Rejecting initial value:"                                                                                                              
[109] "  Error evaluating the log probability at the initial value."                                                                          
[110] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[111] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is -0.261902, but must be between (0, 1)"                
[112] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[113] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[114] "Rejecting initial value:"                                                                                                              
[115] "  Error evaluating the log probability at the initial value."                                                                          
[116] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[117] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is -0.0550278, but must be between (0, 1)"               
[118] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[119] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[120] "Rejecting initial value:"                                                                                                              
[121] "  Error evaluating the log probability at the initial value."                                                                          
[122] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[123] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is -0.041055, but must be between (0, 1)"                
[124] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[125] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[126] "Rejecting initial value:"                                                                                                              
[127] "  Error evaluating the log probability at the initial value."                                                                          
[128] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[129] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is 1.11561, but must be between (0, 1)"                  
[130] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[131] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[132] "Rejecting initial value:"                                                                                                              
[133] "  Error evaluating the log probability at the initial value."                                                                          
[134] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[135] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is 1.25464, but must be between (0, 1)"                  
[136] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[137] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[138] "Rejecting initial value:"                                                                                                              
[139] "  Error evaluating the log probability at the initial value."                                                                          
[140] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[141] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is -0.0928572, but must be between (0, 1)"               
[142] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[143] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[144] "Rejecting initial value:"                                                                                                              
[145] "  Error evaluating the log probability at the initial value."                                                                          
[146] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[147] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is 1.92796, but must be between (0, 1)"                  
[148] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[149] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[150] "Rejecting initial value:"                                                                                                              
[151] "  Error evaluating the log probability at the initial value."                                                                          
[152] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[153] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is 1.18947, but must be between (0, 1)"                  
[154] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[155] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[156] "Rejecting initial value:"                                                                                                              
[157] "  Error evaluating the log probability at the initial value."                                                                          
[158] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[159] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is -0.155538, but must be between (0, 1)"                
[160] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[161] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[162] "Rejecting initial value:"                                                                                                              
[163] "  Error evaluating the log probability at the initial value."                                                                          
[164] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[165] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is -0.0565987, but must be between (0, 1)"               
[166] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[167] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[168] "Rejecting initial value:"                                                                                                              
[169] "  Error evaluating the log probability at the initial value."                                                                          
[170] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[171] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is 1.01561, but must be between (0, 1)"                  
[172] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[173] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[174] "Rejecting initial value:"                                                                                                              
[175] "  Error evaluating the log probability at the initial value."                                                                          
[176] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[177] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is 2.31113, but must be between (0, 1)"                  
[178] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[179] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[180] "Rejecting initial value:"                                                                                                              
[181] "  Error evaluating the log probability at the initial value."                                                                          
[182] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[183] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is 1.48071, but must be between (0, 1)"                  
[184] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[185] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[186] "Rejecting initial value:"                                                                                                              
[187] "  Error evaluating the log probability at the initial value."                                                                          
[188] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[189] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is -0.0183245, but must be between (0, 1)"               
[190] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[191] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[192] "Rejecting initial value:"                                                                                                              
[193] "  Error evaluating the log probability at the initial value."                                                                          
[194] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[195] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is -0.0505354, but must be between (0, 1)"               
[196] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[197] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[198] "Rejecting initial value:"                                                                                                              
[199] "  Error evaluating the log probability at the initial value."                                                                          
[200] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[201] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is 1.10699, but must be between (0, 1)"                  
[202] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[203] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[204] "Rejecting initial value:"                                                                                                              
[205] "  Error evaluating the log probability at the initial value."                                                                          
[206] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[207] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is -0.0787345, but must be between (0, 1)"               
[208] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[209] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[210] "Rejecting initial value:"                                                                                                              
[211] "  Error evaluating the log probability at the initial value."                                                                          
[212] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[213] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is 1.58232, but must be between (0, 1)"                  
[214] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[215] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[216] "Rejecting initial value:"                                                                                                              
[217] "  Error evaluating the log probability at the initial value."                                                                          
[218] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[219] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is 1.01703, but must be between (0, 1)"                  
[220] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[221] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[222] "Rejecting initial value:"                                                                                                              
[223] "  Error evaluating the log probability at the initial value."                                                                          
[224] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[225] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is -0.0209495, but must be between (0, 1)"               
[226] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[227] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[228] "Rejecting initial value:"                                                                                                              
[229] "  Error evaluating the log probability at the initial value."                                                                          
[230] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[231] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is 1.318, but must be between (0, 1)"                    
[232] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[233] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[234] "Rejecting initial value:"                                                                                                              
[235] "  Error evaluating the log probability at the initial value."                                                                          
[236] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[237] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is -0.299839, but must be between (0, 1)"                
[238] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[239] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[240] "Rejecting initial value:"                                                                                                              
[241] "  Error evaluating the log probability at the initial value."                                                                          
[242] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[243] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is -0.274129, but must be between (0, 1)"                
[244] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[245] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[246] "Rejecting initial value:"                                                                                                              
[247] "  Error evaluating the log probability at the initial value."                                                                          
[248] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[249] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is -0.0123291, but must be between (0, 1)"               
[250] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[251] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[252] "Rejecting initial value:"                                                                                                              
[253] "  Error evaluating the log probability at the initial value."                                                                          
[254] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[255] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is 1.78863, but must be between (0, 1)"                  
[256] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[257] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[258] "Rejecting initial value:"                                                                                                              
[259] "  Error evaluating the log probability at the initial value."                                                                          
[260] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[261] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is 1.06626, but must be between (0, 1)"                  
[262] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[263] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[264] "Rejecting initial value:"                                                                                                              
[265] "  Error evaluating the log probability at the initial value."                                                                          
[266] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[267] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is -0.17069, but must be between (0, 1)"                 
[268] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[269] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[270] "Rejecting initial value:"                                                                                                              
[271] "  Error evaluating the log probability at the initial value."                                                                          
[272] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[273] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is -0.0699805, but must be between (0, 1)"               
[274] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[275] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[276] "Rejecting initial value:"                                                                                                              
[277] "  Error evaluating the log probability at the initial value."                                                                          
[278] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[279] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is 1.93048, but must be between (0, 1)"                  
[280] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[281] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[282] "Rejecting initial value:"                                                                                                              
[283] "  Error evaluating the log probability at the initial value."                                                                          
[284] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[285] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is 1.0395, but must be between (0, 1)"                   
[286] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[287] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[288] "Rejecting initial value:"                                                                                                              
[289] "  Error evaluating the log probability at the initial value."                                                                          
[290] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[291] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is 1.71023, but must be between (0, 1)"                  
[292] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[293] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[294] "Rejecting initial value:"                                                                                                              
[295] "  Error evaluating the log probability at the initial value."                                                                          
[296] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[297] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is 1.70424, but must be between (0, 1)"                  
[298] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[299] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[300] "Rejecting initial value:"                                                                                                              
[301] "  Error evaluating the log probability at the initial value."                                                                          
[302] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[303] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is 1.22626, but must be between (0, 1)"                  
[304] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[305] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[306] "Rejecting initial value:"                                                                                                              
[307] "  Error evaluating the log probability at the initial value."                                                                          
[308] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[309] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is 1.68201, but must be between (0, 1)"                  
[310] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[311] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[312] "Rejecting initial value:"                                                                                                              
[313] "  Error evaluating the log probability at the initial value."                                                                          
[314] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[315] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is -0.037525, but must be between (0, 1)"                
[316] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[317] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[318] "Rejecting initial value:"                                                                                                              
[319] "  Error evaluating the log probability at the initial value."                                                                          
[320] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[321] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is -0.129564, but must be between (0, 1)"                
[322] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[323] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[324] "Rejecting initial value:"                                                                                                              
[325] "  Error evaluating the log probability at the initial value."                                                                          
[326] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[327] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is 1.3934, but must be between (0, 1)"                   
[328] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[329] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[330] "Rejecting initial value:"                                                                                                              
[331] "  Error evaluating the log probability at the initial value."                                                                          
[332] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[333] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is 1.2274, but must be between (0, 1)"                   
[334] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[335] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[336] "Rejecting initial value:"                                                                                                              
[337] "  Error evaluating the log probability at the initial value."                                                                          
[338] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[339] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is -0.13497, but must be between (0, 1)"                 
[340] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[341] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[342] "Rejecting initial value:"                                                                                                              
[343] "  Error evaluating the log probability at the initial value."                                                                          
[344] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[345] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is -0.306884, but must be between (0, 1)"                
[346] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[347] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[348] "Rejecting initial value:"                                                                                                              
[349] "  Error evaluating the log probability at the initial value."                                                                          
[350] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[351] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is 1.62236, but must be between (0, 1)"                  
[352] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[353] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[354] "Rejecting initial value:"                                                                                                              
[355] "  Error evaluating the log probability at the initial value."                                                                          
[356] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[357] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is -0.229937, but must be between (0, 1)"                
[358] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[359] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[360] "Rejecting initial value:"                                                                                                              
[361] "  Error evaluating the log probability at the initial value."                                                                          
[362] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[363] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is 1.12563, but must be between (0, 1)"                  
[364] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[365] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[366] "Rejecting initial value:"                                                                                                              
[367] "  Error evaluating the log probability at the initial value."                                                                          
[368] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[369] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is -0.0256329, but must be between (0, 1)"               
[370] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[371] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[372] "Rejecting initial value:"                                                                                                              
[373] "  Error evaluating the log probability at the initial value."                                                                          
[374] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[375] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is -0.0609385, but must be between (0, 1)"               
[376] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[377] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[378] "Rejecting initial value:"                                                                                                              
[379] "  Error evaluating the log probability at the initial value."                                                                          
[380] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[381] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is 1.08042, but must be between (0, 1)"                  
[382] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[383] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[384] "Rejecting initial value:"                                                                                                              
[385] "  Error evaluating the log probability at the initial value."                                                                          
[386] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[387] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is -0.172817, but must be between (0, 1)"                
[388] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[389] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[390] "Rejecting initial value:"                                                                                                              
[391] "  Error evaluating the log probability at the initial value."                                                                          
[392] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[393] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is 1.37284, but must be between (0, 1)"                  
[394] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[395] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[396] "Rejecting initial value:"                                                                                                              
[397] "  Error evaluating the log probability at the initial value."                                                                          
[398] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[399] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is 1.83042, but must be between (0, 1)"                  
[400] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[401] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[402] "Rejecting initial value:"                                                                                                              
[403] "  Error evaluating the log probability at the initial value."                                                                          
[404] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[405] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is 1.42001, but must be between (0, 1)"                  
[406] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[407] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[408] "Rejecting initial value:"                                                                                                              
[409] "  Error evaluating the log probability at the initial value."                                                                          
[410] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[411] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is 1.53312, but must be between (0, 1)"                  
[412] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[413] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[414] "Rejecting initial value:"                                                                                                              
[415] "  Error evaluating the log probability at the initial value."                                                                          
[416] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[417] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is 1.91729, but must be between (0, 1)"                  
[418] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[419] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[420] "Rejecting initial value:"                                                                                                              
[421] "  Error evaluating the log probability at the initial value."                                                                          
[422] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[423] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is 1.3365, but must be between (0, 1)"                   
[424] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[425] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[426] "Rejecting initial value:"                                                                                                              
[427] "  Error evaluating the log probability at the initial value."                                                                          
[428] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[429] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is 1.34812, but must be between (0, 1)"                  
[430] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[431] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[432] "Rejecting initial value:"                                                                                                              
[433] "  Error evaluating the log probability at the initial value."                                                                          
[434] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[435] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is -0.0728368, but must be between (0, 1)"               
[436] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[437] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[438] "Rejecting initial value:"                                                                                                              
[439] "  Error evaluating the log probability at the initial value."                                                                          
[440] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[441] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is 2.0499, but must be between (0, 1)"                   
[442] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[443] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[444] "Rejecting initial value:"                                                                                                              
[445] "  Error evaluating the log probability at the initial value."                                                                          
[446] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[447] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is 1.45968, but must be between (0, 1)"                  
[448] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[449] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[450] "Rejecting initial value:"                                                                                                              
[451] "  Error evaluating the log probability at the initial value."                                                                          
[452] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[453] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is 1.00981, but must be between (0, 1)"                  
[454] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[455] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[456] "Rejecting initial value:"                                                                                                              
[457] "  Error evaluating the log probability at the initial value."                                                                          
[458] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[459] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is -0.294577, but must be between (0, 1)"                
[460] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[461] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[462] "Rejecting initial value:"                                                                                                              
[463] "  Error evaluating the log probability at the initial value."                                                                          
[464] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[465] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is 1.02766, but must be between (0, 1)"                  
[466] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[467] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[468] "Rejecting initial value:"                                                                                                              
[469] "  Error evaluating the log probability at the initial value."                                                                          
[470] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[471] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is 1.1845, but must be between (0, 1)"                   
[472] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[473] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[474] "Rejecting initial value:"                                                                                                              
[475] "  Error evaluating the log probability at the initial value."                                                                          
[476] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[477] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is 2.3628, but must be between (0, 1)"                   
[478] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[479] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[480] "Rejecting initial value:"                                                                                                              
[481] "  Error evaluating the log probability at the initial value."                                                                          
[482] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[483] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is 1.37675, but must be between (0, 1)"                  
[484] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[485] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[486] "Rejecting initial value:"                                                                                                              
[487] "  Error evaluating the log probability at the initial value."                                                                          
[488] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[489] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is -0.00173473, but must be between (0, 1)"              
[490] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[491] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[492] "Rejecting initial value:"                                                                                                              
[493] "  Error evaluating the log probability at the initial value."                                                                          
[494] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[495] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is -0.180005, but must be between (0, 1)"                
[496] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[497] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[498] "Rejecting initial value:"                                                                                                              
[499] "  Error evaluating the log probability at the initial value."                                                                          
[500] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[501] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is 1.06551, but must be between (0, 1)"                  
[502] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[503] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[504] "Rejecting initial value:"                                                                                                              
[505] "  Error evaluating the log probability at the initial value."                                                                          
[506] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[507] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is 1.62884, but must be between (0, 1)"                  
[508] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[509] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[510] "Rejecting initial value:"                                                                                                              
[511] "  Error evaluating the log probability at the initial value."                                                                          
[512] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[513] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is 1.06081, but must be between (0, 1)"                  
[514] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[515] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[516] "Rejecting initial value:"                                                                                                              
[517] "  Error evaluating the log probability at the initial value."                                                                          
[518] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[519] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is 1.22678, but must be between (0, 1)"                  
[520] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[521] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[522] "Rejecting initial value:"                                                                                                              
[523] "  Error evaluating the log probability at the initial value."                                                                          
[524] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[525] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is 1.46573, but must be between (0, 1)"                  
[526] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[527] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[528] "Rejecting initial value:"                                                                                                              
[529] "  Error evaluating the log probability at the initial value."                                                                          
[530] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[531] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is -0.0647285, but must be between (0, 1)"               
[532] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[533] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[534] "Rejecting initial value:"                                                                                                              
[535] "  Error evaluating the log probability at the initial value."                                                                          
[536] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[537] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is -0.195867, but must be between (0, 1)"                
[538] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[539] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[540] "Rejecting initial value:"                                                                                                              
[541] "  Error evaluating the log probability at the initial value."                                                                          
[542] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[543] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is 2.06373, but must be between (0, 1)"                  
[544] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[545] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[546] "Rejecting initial value:"                                                                                                              
[547] "  Error evaluating the log probability at the initial value."                                                                          
[548] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[549] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is -0.0360176, but must be between (0, 1)"               
[550] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[551] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[552] "Rejecting initial value:"                                                                                                              
[553] "  Error evaluating the log probability at the initial value."                                                                          
[554] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[555] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is -0.0637329, but must be between (0, 1)"               
[556] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[557] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[558] "Rejecting initial value:"                                                                                                              
[559] "  Error evaluating the log probability at the initial value."                                                                          
[560] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[561] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is -0.0522275, but must be between (0, 1)"               
[562] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[563] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[564] "Rejecting initial value:"                                                                                                              
[565] "  Error evaluating the log probability at the initial value."                                                                          
[566] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[567] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is -0.0721265, but must be between (0, 1)"               
[568] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[569] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[570] "Rejecting initial value:"                                                                                                              
[571] "  Error evaluating the log probability at the initial value."                                                                          
[572] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[573] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is 1.44547, but must be between (0, 1)"                  
[574] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[575] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[576] "Rejecting initial value:"                                                                                                              
[577] "  Error evaluating the log probability at the initial value."                                                                          
[578] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[579] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is -0.391075, but must be between (0, 1)"                
[580] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[581] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[582] "Rejecting initial value:"                                                                                                              
[583] "  Error evaluating the log probability at the initial value."                                                                          
[584] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[585] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is 1.1849, but must be between (0, 1)"                   
[586] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[587] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[588] "Rejecting initial value:"                                                                                                              
[589] "  Error evaluating the log probability at the initial value."                                                                          
[590] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[591] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is 1.16468, but must be between (0, 1)"                  
[592] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[593] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[594] "Rejecting initial value:"                                                                                                              
[595] "  Error evaluating the log probability at the initial value."                                                                          
[596] "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:"                        
[597] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is 1.06142, but must be between (0, 1)"                  
[598] "If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,"
[599] "but if this warning occurs often then your model may be either severely ill-conditioned or misspecified."                              
[600] "Rejecting initial value:"                                                                                                              
[601] "  Error evaluating the log probability at the initial value."                                                                          
[602] "Initialization between (--2, -2) failed after 100 attempts. "                                                                          
[603] " Try specifying initial values, reducing ranges of constrained values, or reparameterizing the model."                                 
error occurred during calling the sampler; sampling not done

> sessionInfo()
R version 3.2.3 (2015-12-10)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.11.2 (El Capitan)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] rstan_2.9.0   ggplot2_2.0.0 mvtnorm_1.0-3

loaded via a namespace (and not attached):
 [1] colorspace_1.2-6 scales_0.3.0     plyr_1.8.3       tools_3.2.3      inline_0.3.14    gtable_0.1.2    
 [7] gridExtra_2.0.0  Rcpp_0.12.1      codetools_0.2-14 grid_3.2.3       stats4_3.2.3     munsell_0.4.2

I am actually get a little bit overwhelmed with the result and I am wondering whether anyone can help me figure where the problem is?

Thanks!

Sincerely
Jiaqi Zhang
IRT_Mac_OS.R
IRT_Windows_OS.R

Bob Carpenter

unread,
Jan 15, 2016, 1:39:24 PM1/15/16
to stan-...@googlegroups.com
First, we strongly recommend taking the model code out of
the R program and making it standalone so that you can get some
use out of line numbers. I'd also strongly advise indenting
and using standard bracketing.

Also, fewer comments. I always say that comments go stale,
and here's a prime example:

item_diff ~ uniform(0 ,1); # a normal prior for the difficulty

Anyway, there are several problems with this model, the main
one of which is that you need to constrain parameters. If
you really require item_diff in (0,1) uniform, then you need
lower- and upper-bound constraints on item_diff's declaration.
Also, the "guessing" parameter is unconstrained, so you'll get
negative values unless you constrain it or put it through an
(inverse) link function yourself (inv_logit) or constrain it
to fall in (0,1).

- Bob



code_mm<-'data {
int<lower=0> n_student; # n_student: the number of students
int<lower=0> n_item; # n_item: the number of items
int<lower=0,upper=1> y[n_student, n_item]; # the matrix of responses
}

parameters {
vector[n_student] theta; // ability theta for student
vector[n_item] item_diff; // difficulty for item
vector[n_student] guessing; // guessing factor for item
}


model {
// assigning prior distribution for paramaters;
// item_diff is the item difficulty on a uniform(0,1)
item_diff ~ uniform(0 ,1); # a normal prior for the difficulty
// theta is the latent ability with mean 0 and variance 3
theta ~ normal(0,1.732); # a normal prior for the student ability
// guessing follows a prior of uniform(0,1)
// guessing ~ beta(5,23);
guessing ~ uniform(0,1);

// Likelihood:

for(i in 1:n_student)
{
for (j in 1:n_item)
{
y[i,j] ~ bernoulli(guessing[i]*.2+(1-guessing[i])*inv_logit(theta[i] - item_diff[j]));
}
}
}
'
> --
> You received this message because you are subscribed to the Google Groups "Stan users mailing list" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to stan-users+...@googlegroups.com.
> To post to this group, send email to stan-...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
> <IRT_Mac_OS.R><IRT_Windows_OS.R>

Jiaqi Zhang

unread,
Jan 15, 2016, 2:31:26 PM1/15/16
to Stan users mailing list
Thanks, Bob,

I constrained parameters both item_diff and guessing with lower=0, upper=1. And the model is actually run, I am wondering what other problems you see from the proposed model from your point?

Thanks, your suggestion is really helpful!

Sincerely,

Jiaqi
> [225] "Exception thrown at line 30: stan::math::bernoulli_log: Probability parameter is -0.0209495, but must be b...

Bob Carpenter

unread,
Jan 15, 2016, 2:48:35 PM1/15/16
to stan-...@googlegroups.com
Can you send just the current program? We've coded
most of these IRT models in one way or another.

- Bob
Reply all
Reply to author
Forward
0 new messages