-
Notifications
You must be signed in to change notification settings - Fork 19
Creating Bayesian gauge r&R #376
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
base: master
Are you sure you want to change the base?
Conversation
- Initial QML & R-code development
Adding model comparison and analysis of effects output tables based on the BayesFactor package
R code for Bayesian variance components table
1) Fitting metalog distribution to MCMC samples 2) Plotting posteriors based on metalogs with option to query them 3) Removing analysis of effects and comparing full vs. main effects model instead. Here, I added the option to choose the model manually or based on the BF in favour of the full model.
- QML and R code for contour plot - Update renv lock file
- Separate % Contribution table - Risk table that goes along with contour plot
- Gauge evaluation output now includes separate tables with uncertainty estimates
- Allowing to fit metalog or generalised inverse Gaussian to MCMC samples - Merging some of the output tables together
- Correction of the calculations for variance parameters - Storing % Contribution, Study Variation and Tolerance as JaspStates for plotting
1) Adding posteriors for percentages 2) Adding descriptive plots that are already part of the frequentist module
1) Adding plot for g-prior 2) Function for conversion from wide to long format
Adding diagnostics table
1) Adding footnotes to tables 2) Adding diagnostic plots 3) Changing axis limits and breaks for posterior plots as well as how functions are fit to the MCMC samples
- New data structures for storing MCMC samples since the old ones seemed to lead to errors in JASP
1) Fixing trace plot y limits 2) Manual plot for autocorrelations with multiple chains in one plot
- Adding histogram outlines for MCMC samples - Adjusting y-limit functions accordingly - Moving footnote for posterior summary table so it is only displayed if CrI is enabled
- Code for adding tables to gauge r&R report - Update dependencies
- Fixing dependencies & posterior plots - Adding number of distinct categories - Cleaning up the code
- Unit tests and snapshots
1) adding help file 2) updating dependencies and functionality of r&R table checkbox in the code 3) code clean-up 4) updating unit tests
Co-authored-by: Don van den Bergh <donvdbergh@hotmail.com>
Co-authored-by: Don van den Bergh <donvdbergh@hotmail.com>
Co-authored-by: Don van den Bergh <donvdbergh@hotmail.com>
Co-authored-by: Don van den Bergh <donvdbergh@hotmail.com>
Co-authored-by: Don van den Bergh <donvdbergh@hotmail.com>
- moving data reading, error checking etc. to sub-functions - translations - Edit to .rmNewLine function: Now also removes new line at the end of the string. - Manually specifying 2 chains in the unit tests as the default was changed to 4
- clean up & adding dependencies - assigning colnames to data frames within the .fillTablesGaugeEval function - fixing translation - removing some unnecessary QML code
- Adjusting use of .controlChart function and unit tests - Fixing translation issues
Making sure that plots get unchecked in case type 3 analysis is selected when the checkbox is enabled
R/msaBayesianGaugeRR.R
Outdated
jaspResults[["variancePosteriors"]] <- variancePosteriors | ||
|
||
if(!ready) { | ||
jaspResults[["variancePosteriors"]][["plot"]] <- createJaspPlot(width = 600, height = 320) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe also add a title to the placeholder plots
bfTest <- .runBFtest(jaspResults, dataset, measurements, parts, operators, options, ready) | ||
|
||
# Model comparison table | ||
if(options[["RRTable"]] && !options$report){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stylistic remark: It would probably be better to stick with either option[["option"]] or option$option; I prefer the former.
.fitDistToSamples(jaspResults, options, ready) | ||
|
||
# insert report here | ||
if(options$report) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stylistic remark: I believe it's JASP style to use a space after if and for. Also no curly brackets for single line if-statements.
Looks great to me @jvli4n ! I added a few comments, but I could not find anything substantial. I also did a quick test run in JASP and seems to work fine. Before merging this, we might want to consider where this should be located. I don't think the current location in the menu, right below the classical gauge r&R is ideal. I would suggest either a subheading ("Bayesian analyses") within the module or even a whole different module. |
@JTPetter you are right about the location of the analysis. I already talked to @EJWagenmakers about this, and it is probably best to create a new module for the Bayesian analyses. |
- Allowing the user to query the posterior based on data cut-off - Clean-up - Corresponding changes to unit tests
- Fixing bug in determining axis limits - Updating corresponding snapshots
Type 2 & 3 Bayesian gauge r&R analysis