Performing a simple regression, the following error message appears:
I couldn’t identify the problem. Could it be something from the installation?
# options
options(mc.cores = parallel::detectCores())
rstan_options(auto_write = TRUE)
# configurações para mcmc
chains <- 4
iter <- 1500
warmup <- 700
seed <- 12345677
# input data
input_data<- list(
N = 100,
x = rnorm(100),
y = rnorm(100,2,3)
)
# parametrs
pars_model_1 <- c('alpha', 'sigma','beta')
# model
fit_model_1 <- stan(
file= "linear_regression.stan",
data= input_data,
iter = iter + warmup,
warmup = warmup,
seed = seed,
pars = pars_model_1
)
linear_regression.stan (198 Bytes)
Output:
starting worker pid=2626078 on localhost:11429 at 18:56:29.241
starting worker pid=2626091 on localhost:11429 at 18:56:29.446
starting worker pid=2626104 on localhost:11429 at 18:56:29.652
starting worker pid=2626117 on localhost:11429 at 18:56:29.864
SAMPLING FOR MODEL ‘linear_regression’ NOW (CHAIN 1).
Chain 1:
Chain 1: Gradient evaluation took 3e-05 seconds
Chain 1: 1000 transitions using 10 leapfrog steps per transition would take 0.3 seconds.
Chain 1: Adjust your expectations accordingly!
Chain 1:
Chain 1:
double free or corruption (out)
SAMPLING FOR MODEL ‘linear_regression’ NOW (CHAIN 2).
Chain 2:
Chain 2: Gradient evaluation took 4.5e-05 seconds
Chain 2: 1000 transitions using 10 leapfrog steps per transition would take 0.45 seconds.
Chain 2: Adjust your expectations accordingly!
Chain 2:
Chain 2:
double free or corruption (out)
Error in unserialize(socklist[[n]]) : error reading from connection
-
Operating System
platform x86_64-redhat-linux-gnu
arch x86_64
os linux-gnu
system x86_64, linux-gnu
status
major 4
minor 0.2
year 2020
month 06
day 22
svn rev 78730
language R
version.string R version 4.0.2 (2020-06-22)
nickname Taking Off Again -
RStan Version
2.21.5 -
Output of
writeLines(readLines(file.path(Sys.getenv("HOME"), ".R/Makevars")))
Error in file(con, “r”) : cannot open the connection
In addition: Warning message:
In file(con, “r”) :
cannot open file ‘/home/ibge.gov.br/mbueno/.R/Makevars’: No such file or directory -
Output of
devtools::session_info("rstan")
─ Session info ──────────────────────────────────────────────────────────────────────────────────
setting value
version R version 4.0.2 (2020-06-22)
os CentOS Linux 8 (Core)
system x86_64, linux-gnu
ui RStudio
language (EN)
collate en_US.UTF-8
ctype en_US.UTF-8
tz America/New_York
date 2022-08-16
─ Packages ──────────────────────────────────────────────────────────────────────────────────────
package * version date lib source
assertthat 0.2.1 2019-03-21 [2] CRAN (R 4.0.2)
backports 1.1.10 2020-09-15 [2] CRAN (R 4.0.2)
BH 1.72.0-3 2020-01-08 [2] CRAN (R 4.0.2)
brio 1.1.3 2021-11-30 [1] CRAN (R 4.0.2)
callr 3.7.0 2021-04-20 [1] CRAN (R 4.0.2)
checkmate 2.0.0 2020-02-06 [1] CRAN (R 4.0.2)
cli 3.3.0 2022-04-25 [1] CRAN (R 4.0.2)
colorspace 1.4-1 2019-03-18 [2] CRAN (R 4.0.2)
crayon 1.3.4 2017-09-16 [2] CRAN (R 4.0.2)
desc 1.4.1 2022-03-06 [1] CRAN (R 4.0.2)
diffobj 0.3.5 2021-10-05 [1] CRAN (R 4.0.2)
digest 0.6.25 2020-02-23 [2] CRAN (R 4.0.2)
ellipsis 0.3.2 2021-04-29 [1] CRAN (R 4.0.2)
evaluate 0.15 2022-02-18 [1] CRAN (R 4.0.2)
fansi 0.4.1 2020-01-08 [2] CRAN (R 4.0.2)
farver 2.0.3 2020-01-16 [2] CRAN (R 4.0.2)
ggplot2 * 3.3.6 2022-05-03 [1] CRAN (R 4.0.2)
glue 1.6.2 2022-02-24 [1] CRAN (R 4.0.2)
gridExtra 2.3 2017-09-09 [2] CRAN (R 4.0.2)
gtable 0.3.0 2019-03-25 [2] CRAN (R 4.0.2)
inline 0.3.19 2021-05-31 [1] CRAN (R 4.0.2)
isoband 0.2.2 2020-06-20 [2] CRAN (R 4.0.2)
jsonlite 1.8.0 2022-02-22 [1] CRAN (R 4.0.2)
labeling 0.3 2014-08-23 [2] CRAN (R 4.0.2)
lattice 0.20-41 2020-04-02 [2] CRAN (R 4.0.2)
lifecycle 1.0.1 2021-09-24 [1] CRAN (R 4.0.2)
loo 2.4.1 2020-12-09 [1] CRAN (R 4.0.2)
magrittr 1.5 2014-11-22 [2] CRAN (R 4.0.2)
MASS 7.3-51.6 2020-04-26 [2] CRAN (R 4.0.2)
Matrix 1.2-18 2019-11-27 [2] CRAN (R 4.0.2)
matrixStats 0.59.0 2021-06-01 [1] CRAN (R 4.0.2)
mgcv 1.8-31 2019-11-09 [2] CRAN (R 4.0.2)
munsell 0.5.0 2018-06-12 [2] CRAN (R 4.0.2)
nlme 3.1-148 2020-05-24 [2] CRAN (R 4.0.2)
pillar 1.4.6 2020-07-10 [2] CRAN (R 4.0.2)
pkgbuild 1.3.1 2021-12-20 [1] CRAN (R 4.0.2)
pkgconfig 2.0.3 2019-09-22 [2] CRAN (R 4.0.2)
pkgload 1.2.4 2021-11-30 [1] CRAN (R 4.0.2)
praise 1.0.0 2015-08-11 [2] CRAN (R 4.0.2)
prettyunits 1.1.1 2020-01-24 [2] CRAN (R 4.0.2)
processx 3.7.0 2022-07-07 [1] CRAN (R 4.0.2)
ps 1.3.4 2020-08-11 [2] CRAN (R 4.0.2)
R6 2.4.1 2019-11-12 [2] CRAN (R 4.0.2)
RColorBrewer 1.1-2 2014-12-07 [2] CRAN (R 4.0.2)
Rcpp 1.0.5 2020-07-06 [2] CRAN (R 4.0.2)
RcppEigen 0.3.3.9.1 2020-12-17 [1] CRAN (R 4.0.2)
RcppParallel 5.1.4 2021-05-04 [1] CRAN (R 4.0.2)
rematch2 2.1.2 2020-05-01 [2] CRAN (R 4.0.2)
rlang 1.0.2 2022-03-04 [1] CRAN (R 4.0.2)
rprojroot 2.0.2 2020-11-15 [1] CRAN (R 4.0.2)
rstan * 2.21.5 2022-04-11 [1] CRAN (R 4.0.2)
rstudioapi 0.11 2020-02-07 [2] CRAN (R 4.0.2)
scales 1.1.1 2020-05-11 [2] CRAN (R 4.0.2)
StanHeaders * 2.21.0-7 2020-12-17 [1] CRAN (R 4.0.2)
testthat 3.1.4 2022-04-26 [1] CRAN (R 4.0.2)
tibble 3.0.3 2020-07-10 [2] CRAN (R 4.0.2)
utf8 1.1.4 2018-05-24 [2] CRAN (R 4.0.2)
vctrs 0.4.1 2022-04-13 [1] CRAN (R 4.0.2)
viridisLite 0.3.0 2018-02-01 [2] CRAN (R 4.0.2)
waldo 0.4.0 2022-03-16 [1] CRAN (R 4.0.2)
withr 2.5.0 2022-03-03 [1] CRAN (R 4.0.2)
[1] /home/shared/DPE/gradepop/library
[2] /usr/lib64/R/library
[3] /usr/share/R/library