Open will246 opened 6 months ago
Hi @will246, thanks for reporting this! I was able to generate the same error, but unfortunately don't know the solution. I do suspect that it has to do with the fact that a) the code is almost a decade old, and the underlying software has likely changed! e.g. the eCO2 dataset from SoilR is different and you can load the original like this:
download.file('https://github.com/cran/SoilR/raw/1.1-23/data/eCO2.rda',
'eCO2.rda')
load('eCO2.rda')
In addition, stan has changed and the function integrate_ode
has been deprecated as described in https://mc-stan.org/docs/functions-reference/functions-old-ode-solver.html.
Hopefully the author and Stan developer @bob-carpenter has some insight.
@dlebauer is likely correct. I had also recently had a look at the case study, and also found some conceptual errors. I'd recommend to rework it a bit more thoroughly and then re-upload it.
Hi, @dlebauer. There are a bunch of things that have changed in our interfaces, so probably best to rewrite. Hi, @nsiccha --- what did you want to fix conceptually? I'm happy to review.
Hi folks. I have some students who might be interested in revising this if you don't mind a longer time horizon.
@nsiccha I'm curious what you meant by conceptual errors here.
I hope everyone had nice holidays.
@bob-carpenter and @ktoddbrown: The following are things I would change.
fit_me
objects has both 100 or 1000 draws per chain and uses both 2 or 4 chains? It gets initialized via fit_me <- stan("soil_incubation_measurement_err.stan", [...], chains=2, iter=100, seed=1234);
, the output after that block twice shows Iteration: 100 / 100 [100%] (Sampling)
, but the summary after that prints ## 4 chains, each with iter=1000; warmup=500; thin=1;
? The trace plot after the summary than again shows 100 iterations per chainI'd be happy to help with rewriting, improving and/or extending the case study, though I don't think I'll have time before February. What kind of time frame did you have in mind, @ktoddbrown?
Thank you for your input everyone @dlebauer @ktoddbrown @nsiccha. I was eventually able to get it to run. I used soil_incubation.stan from https://github.com/soil-metamodel/stan/tree/master/soil-incubation. It seems that the syntax in that file is different to that shown on the example page (https://mc-stan.org/users/documentation/case-studies/soil-knit.html). @nsiccha, I noticed the issues with mixing as well. I can look into this further too.
Thank you for your input everyone @dlebauer @ktoddbrown @nsiccha. I was eventually able to get it to run. I used soil_incubation.stan from https://github.com/soil-metamodel/stan/tree/master/soil-incubation. It seems that the syntax in that file is different to that shown on the example page (https://mc-stan.org/users/documentation/case-studies/soil-knit.html). @nsiccha, I noticed the issues with mixing as well. I can look into this further too.
Actually, I used soil_incubation.stan from here: https://github.com/stan-dev/example-models/blob/master/knitr/soil-carbon/soil_incubation.stan.
Hello there,
When I try to run soil_incubation.stan with the example data from the SoilR package (https://mc-stan.org/users/documentation/case-studies/soil-knit.html), I get the following error:
`Error in stanc(file = file, model_code = model_code, model_name = model_name, : 0
Semantic error in 'string', line 93, column 13 to line 94, column 57:
Ill-typed arguments supplied to function 'integrate_ode'. Available signatures: ((real, real[], real[], data real[], data int[]) => real[], real[], real, real[], real[], data real[], data int[]) => real[,] Instead supplied arguments of incompatible type: (real, real[], real[], real[], int[]) => real[], real[], real, real[], real[], real[], int[].`
Do you know of any possible reasons for this? Thank you.