You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rstan throws the error Error in if (any(efbmi_per_chain < threshold)) { : missing value where TRUE/FALSE needed, which apparently, should not be the case (ref).
Description:
It happens when I try to fit the model with some data, but not others.
I am trying to model count C with two covariates: Treatment and Mice.
data{
int C[28];
int Mice[28];
int Treatment[28];
}
parameters{
vector[6] bT;
vector[28] bA;
}
model{
vector[28] lambda;
bA ~ normal( 0 , 5 );
bT ~ normal( 5 , 10 );
for ( i in 1:28 ) {
lambda[i] = bT[Treatment[i]] + bA[Mice[i]];
lambda[i] = exp(lambda[i]);
}
C ~ poisson( lambda );
}
Current Output:
The model runs when I use data = list(C = d$C_good, ....)
But when I change the count to data = list(C = d$C_error, ....), the model samples and throws the error
Summary:
Rstan throws the error
Error in if (any(efbmi_per_chain < threshold)) { : missing value where TRUE/FALSE needed
, which apparently, should not be the case (ref).Description:
It happens when I try to fit the model with some data, but not others.
I am trying to model count
C
with two covariates:Treatment
andMice
.Reproducible Steps:
Code to get the data from
dput
My stan model
Current Output:
The model runs when I use
data = list(C = d$C_good, ....)
But when I change the count to
data = list(C = d$C_error, ....)
, the model samples and throws the errorRStan Version:
‘2.26.13’
R Version:
"R version 4.1.3 (2022-03-10)"
Operating System:
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19044)
The text was updated successfully, but these errors were encountered: