Giter Club home page Giter Club logo

Comments (10)

jpiironen avatar jpiironen commented on June 11, 2024

It seems you removed the detailed description so I'm copy-pasting it here for reference:

"I get an install error on R 3.4 but it installed fine with R 3.3 a couple of days earlier.
devtools::install_github('stan-dev/projpred', build_vignettes = TRUE)
....
This is projpred version 0.4.2
error occurred during calling the sampler; sampling not done
Quitting from lines 36-47 (quickstart.Rmd)
Error: processing vignette 'quickstart.Rmd' failed with diagnostics:
Invalid stanfit object produced please report bug
Execution halted
Error: Command failed (1)

Session info :
setting value
version R version 3.4.0 (2017-04-21)
system x86_64, darwin15.6.0
ui RStudio (1.0.143)"

We tested the installation again with the new R version 3.4 (on Linux) and the vignette builds correctly. Based on the error message, it seems that the rstanarm is crashing and not our software. Which rstanarm version are you using? If you are running old version of rstanarm, you could try updating it and then installing projpred again.

from projpred.

dfumento avatar dfumento commented on June 11, 2024

Thank you. I keep the software up-to-date and I am using rstanarm 2.15.2 with Stan 2.15.1. I am on Mac OS Sierra 10.12.3 (up to date).

from projpred.

paasim avatar paasim commented on June 11, 2024

Hi,
unfortunately we are not able to reproduce the error. However, we made some changes to the package, so you could simply try to install the package again.

If that does not work, at least you should be able to install the package without building the vignettes (ie. just devtools::install_github('stan-dev/projpred', build_vignettes = FALSE)). If that works, it would be helpful if you could try to run the following code and see if it produces an error (it is the same code that seems to produce the crash that you observe):

library(rstanarm)
library(projpred)
library(ggplot2)
data('df_gaussian', package = 'projpred')
n <- nrow(df_gaussian$x) # 100
D <- ncol(df_gaussian$x) # 20
p0 <- 5 # prior guess for the number of relevant variables
tau0 <- p0/(D-p0) * 1/sqrt(n) # scale for tau (notice that stan_glm will automatically scale this by sigma)
prior_coeff <- hs(df=1, global_df=1, global_scale=tau0) # horseshoe prior
fit <- stan_glm(y ~ x, family=gaussian(), data=df_gaussian, prior=prior_coeff,
            # to make this vignette build fast, we use only 2 chains and
            # 800 draws. In practice, more conservative values, eg. 4 chains
            # and 2000 draws might be required for reliable inference.
            seed=1, adapt_delta=0.999, chains=2, iter=800) 
fit <- varsel(fit, method='L1')
fit$varsel$chosen

from projpred.

dfumento avatar dfumento commented on June 11, 2024

projpred loaded. Thank you.

After the first fit statement I received the following message:
SAMPLING FOR MODEL 'continuous' NOW (CHAIN 1).
[1] "Error in sampler$call_sampler(args_list[[i]]) : "
[2] " empty_nested() must be true before calling recover_memory()"
error occurred during calling the sampler; sampling not done
Error in check_stanfit(stanfit) :
Invalid stanfit object produced please report bug

I am running with Mac OS Sierra 10.12.4 with the latest command line tools and also installed the latest llvm with homebrew. /usr/local/Cellar/llvm/4.0.0_1

clang version 4.0.0 (tags/RELEASE_400/final)
Target: x86_64-apple-darwin16.5.0
Thread model: posix
InstalledDir: /usr/local/opt/llvm/bin

from projpred.

jpiironen avatar jpiironen commented on June 11, 2024

@jgabry : do you have any idea about what might cause this kind of error message when fitting rstanarm-model ('Invalid stanfit object produced please report bug')? Looks like it comes from rstanarm but I really have no clue about the possible cause.

from projpred.

dfumento avatar dfumento commented on June 11, 2024

There was an update to rstanarm that fixed the problem.

from projpred.

jgabry avatar jgabry commented on June 11, 2024

from projpred.

jpiironen avatar jpiironen commented on June 11, 2024

@dfumento : so did I understand correctly that the issue is now resolved and can be closed?

from projpred.

jgabry avatar jgabry commented on June 11, 2024

from projpred.

jpiironen avatar jpiironen commented on June 11, 2024

Great, thanks!

from projpred.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.