stan

Not able to install rstanarm on Ubuntu 18.04 LTS

霸气de小男生 提交于 2021-02-08 12:29:29
问题 I'm not able to install rstanarm on R 3.5.3 running on Ubuntu 18.04 LTS . I used the following commands: install.packages("rstanarm") and devtools::install_github("stan-dev/rstanarm", build_vignettes = FALSE) and both throws the following error: Execution halted Makevars:17: recipe for target 'stan_files/lm.cc' failed make: *** [stan_files/lm.cc] Error 1 ERROR: compilation failed for package ‘rstanarm’ sessionInfo sessionInfo() R version 3.5.3 (2019-03-11) Platform: x86_64-pc-linux-gnu (64

Plot of the LC50 Curve in R using ggplot2 with estimates obtained in the stan

假如想象 提交于 2021-01-28 19:34:44
问题 I'm trying to make the following graphic below in ggplot2. See that I am adjusting a logistic regression model under the Bayesian approach using the stan package. data: https://drive.google.com/file/d/1NNA6DFYFSVkwuL92RYe58E_Z99BXl7HE/view?usp=sharing library(dplyr) library(rstanarm) library(ggplot2) dados<- read.table("dados.csv", header = T, sep=";", dec = ",") dados$periodo <- as.factor(dados$periodo) dados <- dados %>% mutate(proporcao = (dados$resposta)/60) dados <- dados %>% mutate

BRM model compiling but returning model object

吃可爱长大的小学妹 提交于 2020-08-25 04:24:30
问题 I am building a hierarchical model using the BRMS package in R, and having trouble fitting a model successfully. When running the code it outputs "Compiling Stan program...", runs for about five minutes, and then stops. There are no other messages or errors, but there is no model object. Some reproducible code from an example online, though I imagine this is not code related since the same issue occurs in my model and this one downloaded from a tutorial. When running the following code the

Error on the stan file compilation using R 3.6.0. and Win 10

喜夏-厌秋 提交于 2020-01-16 18:52:51
问题 Error in compileCode(f, code, language = language, verbose = verbose) : Compilation ERROR, function(s)/method(s) not created! Error in .shlib_internal(commandArgs(TRUE)) : C++14 standard requested but CXX14 is not defined Calls: <Anonymous> -> .shlib_internal Execution halted In addition: Warning message: In system(cmd, intern = !verbose) : running command 'C:/PROGRA~1/R/R-36~1.0/bin/x64/R CMD SHLIB file1a1860a0379.cpp 2> file1a1860a0379.cpp.err.txt' had status 1 Error in sink(type = "output"

Error on the stan file compilation using R 3.6.0. and Win 10

有些话、适合烂在心里 提交于 2020-01-16 18:51:21
问题 Error in compileCode(f, code, language = language, verbose = verbose) : Compilation ERROR, function(s)/method(s) not created! Error in .shlib_internal(commandArgs(TRUE)) : C++14 standard requested but CXX14 is not defined Calls: <Anonymous> -> .shlib_internal Execution halted In addition: Warning message: In system(cmd, intern = !verbose) : running command 'C:/PROGRA~1/R/R-36~1.0/bin/x64/R CMD SHLIB file1a1860a0379.cpp 2> file1a1860a0379.cpp.err.txt' had status 1 Error in sink(type = "output"

prep_call_sampler not found in Stan program in Linux using R

三世轮回 提交于 2020-01-05 03:59:06
问题 I have a simple .stan program for multilevel model that was running fine in Windows. But I was getting this strange error in Linux when I was running it. 'prep_call_sampler not found' 回答1: I tried to find the source of the problem, updated packages and looked up online for solutions. Finally, I saw a blog with a post describing a similar problem in the STAN forum The solution was to simply replace the a*b with a * b in the .stan program and the model works fine in linux. Just thought of

Sampling from prior without running a separate model

江枫思渺然 提交于 2020-01-02 08:01:45
问题 I want to graph the histograms of parameter estimates from a stan model against the priors for those parameters. I have tried doing this by running a model in stan, graphing it with ggplot2, then overlaying an approximation of the prior distribution using R's random generator function (e.g. rnorm() , rbinom() ) but I have run into many scaling issues that make the graphs impossible to get looking right. I was thinking a better way to do it would be simply to sample directly from the prior