JanaJarecki / cognitivemodels

Cognitivemodels is an open-source R library to create, fit, test, and compare computational cognitive models based on machine-learning principles.
25 stars 4 forks source link

strange error in fitting parameters in ebm_j #68

Closed FlorianSeitz closed 4 years ago

FlorianSeitz commented 4 years ago

https://github.com/JanaJarecki/cognitivemodels/blob/ce09e4e81a561446c187b63121de4d7150e48f90/tests/testthat/test_ebm_j.R#L147

Executing this line for subjects 41 and 42 (subject ids start with 41) works perfectly. However, when I delete the "subj <= 42", I receive the following error already for the first participant for which the parameters are estimated:

Error in arr[, 1:na[s], s][] <- as.matrix(model.frame(formula(f, lhs = 0, : replacement has length zero error is located at: cm-class, line 276