I have a large dataset (83 variable and ~ 45 observations) and I am fitting bayesian glm for each variable in R using rstanarm. All my bayesian models are saved in a large list (my_lms). Then I try to generate a summary for the parameters using describe_posterior(), however I get this error message only when I try to calculate Rope.

Sampling priors, please wait…

Error in if (all(range == “default”)) { :

missing value where TRUE/FALSE needed

In addition: Warning messages:

1: Warning: Following potential variables could not be found in the data: X

2: In doTryCatch(return(expr), name, parentenv, handler) :

Note that the default rope range for binomial models might change in future versions (see rope range for linear models · Issue #364 · easystats/bayestestR · GitHub).Please set it explicitly to preserve current results.

My code:

my_lms ← lapply(n:ncol(X), function(i) stan_glm(scale(X[,i]) ~ age_mn_fract + genotype ,

data = X ,

seed =111, chains = 4, cores= 4,

iter= 5000,adapt_delta = 0.95,

diagnostic_file = file.path(tempdir(), “df1.csv”))

)

my_coeffs ← function(x) {describe_posterior(x,

centrality = “median”, dispersion = TRUE,

ci= 0.95, ci_method= “HDI”,

rope_ci = 0.95,

test = c( “p_direction”, “rope”, “bayesfactor”))

}

my_Coeff<- lapply(my_lms, my_coeffs)

- Operating System: macOS Catalina v 10.15.7
- rstanarm Version: 2.21.2 (R v 3.6.3)

Thanks in advance