Hello Stan Community,
I encountered a problem trying to read Stan’s output files in RStan.
I fit a model (without a generated quantities block) and got four different chains saved as four csv files.
Using CmdStanPy, I used these samples to produce four different csv files with generated quantities.
Now, to analyze the generated quantities, I want to read them in RStan.
However, using the read_stan_csv() function, I get the following error:
fit <- read_stan_csv(csvfiles)
Error in `[.data.frame`(df, c(paridx, lp__idx)[midx]) :
undefined columns selected
In addition: Warning messages:
1: In parse_stancsv_comments(comments) :
line with "Elapsed Time" not found
2: In parse_stancsv_comments(comments) :
line with "Elapsed Time" not found
3: In parse_stancsv_comments(comments) :
line with "Elapsed Time" not found
4: In parse_stancsv_comments(comments) :
line with "Elapsed Time" not found
Is it impossible to read such generated quantities files into RStan, or am I missing the correct function to do so?
I wouldn’t mind using RStan to create the generated quantities on the fly, but I wasn’t able to find a way to do it (I could only do so in CmdStanPy).
Many thanks for your help!
Roey