-
-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't use Shinystan to look at rstanarm glmer results #128
Comments
I just tried looking at the Stanfit object in Shinystan right after getting glmer results. Shinystan launches fine in that case. So, is this an Rstanarm issue instead? |
Thanks Rayleigh. I'm not sure yet what the problem is, but it might Can you send me the csv files? Or trimmed csv files (if they're big). I On Tuesday, July 19, 2016, rayleigh <notifications@github.com
|
One csv file is around 20 MB. What can I trim to make it smaller for you? |
I probably only need a small subset of the posterior draws. So you could On Tuesday, July 19, 2016, notifications@github.com wrote:
|
Was this ever resolved? I get the same error when trying to read in a sample file generated by |
The problem persists as of Stan 2.17.0, the problem is when reading fits from CSV files. A minimal reproducible example:
Results in
|
So I filed a pull request with a fix. In the long run it might be more reasonable to unify the CSV output of |
Extract correct info from fits reconstructed from CSV files. Refs #128
PR already merged and release is coming so I'm closing this one. Thanks @martinmodrak! I agree that in the long term unifying the output is desirable. |
For a project, I used RStanarm's glmer function in the following way:
stan_fit <- stan_glmer(formula = formula(reg_formula), data = data_matrix,
family = "binomial", iter = 500, sample_file = output_filename)
However, when I tried to upload the files and look at the results in Shinystan, I got the following warnings and error messages:
> naes_one <- read_stan_csv(c("Annenberg_analysis_1_sample_output1", "Annenberg_analysis_1_sample_output2", "Annenberg_analysis_1_sample_output3", "Annenberg_analysis_1_sample_output4"))
There were 12 warnings (use warnings() to see them)
> warnings()
Warning messages:
1: In if (adapt_term_lineno == len) adaptation_info <- "" else { ... :
the condition has length > 1 and only the first element will be used
2: In (adapt_term_lineno + 1):(time_lineno - 1) :
numerical expression has 2 elements: only the first used
3: In 1:(adapt_term_lineno - 1) :
numerical expression has 2 elements: only the first used
4: In if (adapt_term_lineno == len) adaptation_info <- "" else { ... :
the condition has length > 1 and only the first element will be used
5: In (adapt_term_lineno + 1):(time_lineno - 1) :
numerical expression has 2 elements: only the first used
6: In 1:(adapt_term_lineno - 1) :
numerical expression has 2 elements: only the first used
7: In if (adapt_term_lineno == len) adaptation_info <- "" else { ... :
the condition has length > 1 and only the first element will be used
8: In (adapt_term_lineno + 1):(time_lineno - 1) :
numerical expression has 2 elements: only the first used
9: In 1:(adapt_term_lineno - 1) :
numerical expression has 2 elements: only the first used
10: In if (adapt_term_lineno == len) adaptation_info <- "" else { ... :
the condition has length > 1 and only the first element will be used
11: In (adapt_term_lineno + 1):(time_lineno - 1) :
numerical expression has 2 elements: only the first used
12: In 1:(adapt_term_lineno - 1) :
numerical expression has 2 elements: only the first used
> launch_shinystan(naes_one)
Creating shinystan object...
Error in if (.used_vb(x) || !(algo %in% c("NUTS", "HMC"))) warning("Many features are only available for models fit using\n algorithm NUTS or algorithm HMC.", :
missing value where TRUE/FALSE needed
The text was updated successfully, but these errors were encountered: