Coder Social home page Coder Social logo

Comments (9)

jgabry avatar jgabry commented on June 11, 2024 1

fixed typo in my previous comment (it was installing RStan not rstanarm)

from rstanarm.

lauracp92 avatar lauracp92 commented on June 11, 2024

Hello Daniel,
were you able to fix the error?
Do you know which R version works for doing random effects?
Thank you

from rstanarm.

padpadpadpad avatar padpadpadpad commented on June 11, 2024

Hi @lauracp92 I have not been able to solve this with the most recent install of the rstanarm survival branch. Any ideas @sambrilleman @jgabry ?

I had an old fork of the repository that used to work: https://github.com/padpadpadpad/rstanarm but that has broken now too, with the error:

Error in status < 0 || status > 3 : 
  'length = 40' in coercion to 'logical(1)'

So I do not have a fix for this at all. Frustrating because stan_surv() is amazing and I would love to be able to easily and reliably use it.

Wonder if it is an error linked to an update of rstan more generally?

from rstanarm.

jgabry avatar jgabry commented on June 11, 2024

Does the version in the mc-stan packages repository work?

install.packages("rstanarm", repos = c("https://mc-stan.org/r-packages/", getOption("repos")))

from rstanarm.

padpadpadpad avatar padpadpadpad commented on June 11, 2024

@jgabry seems to install but it does not have the survival branch in so the stan_surv() function does not exist.

from rstanarm.

jgabry avatar jgabry commented on June 11, 2024

Hmm I thought that had the survival branch, but you're right that stan_surv isn't there. Maybe post a comment on the PR for the survival branch #323 and see if any of the main contributors to that branch have any ideas why it isn't working, I'm honestly not sure. Sorry about that! (I'm still hoping to include this on CRAN at some point but I think we were still waiting for some work to be finished on that branch.)

from rstanarm.

sambrilleman avatar sambrilleman commented on June 11, 2024

Sorry for the slow reply. Yeah for this issue:

I had an old fork of the repository that used to work: https://github.com/padpadpadpad/rstanarm but that has broken now too, with the error:

take a look at this PR @padpadpadpad: #594
Doing the same on your fork should hopefully fix the issue, for R >= 4.3.

As for the error that started this thread I'm a little unsure at the moment!

@jgabry seems to install but it does not have the survival branch in so the stan_surv() function does not exist.

Also, for this issue, I think it is because if the binary isn't compatible with version of R you have, then it falls back to another version of rstanarm at the next repos source. So what happens is you don't get the version from https://mc-stan.org/r-packages/ because its not compatible with say R 4.3, and then R silently goes to CRAN because you have it in your default repos list and installs the latest CRAN version of rstanarm which doesn't have stan_surv! 😢 The fix would be updating the binaries at https://mc-stan.org/r-packages/ to have a version built for R 4.3, but I'm not sure who has time to do that! I think @rok-cesnovar was going to try, but not sure if he ever got there.
So for people who cannot build from source there is no easy solution I don't think.
Or the better fix, getting stan_surv into the CRAN release 👴 😅

Unfortunately I'm not working on this stuff at the moment, and now work almost exclusively in Python so don't even really have a dev environment set up to easily test stuff out atm...! 😞

from rstanarm.

sambrilleman avatar sambrilleman commented on June 11, 2024

There was an issue thread somewhere here or in the forums about the https://mc-stan.org/r-packages/ falling back to CRAN when there isn't a binary for the R version you have, but I can't for the life of me find it.

from rstanarm.

padpadpadpad avatar padpadpadpad commented on June 11, 2024

Hi @sambrilleman and @jgabry, I do really appreciate you responding - especially as Sam no longer actively work on this.

I have tried what you suggested, but now with both the survival branch on rstanarm and my old fork, I get the error error: no member named 'validate_dims' in namespace 'stan::io'.

Seems to be an old-ish problem, but I cannot work out how to fix it easily.

With the latest CRAN installs of rstanarm, rstan and StanHeaders everything works fine.

from rstanarm.

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.