Repository navigation
Conversation
- Add @examples to the 31 exported functions and S3 methods whose help pages had none, using cancer_psa_data, psa_cdiff, and hund_strat, and a tiny self-contained model for run_psa(), run_owsa_det(), and run_twsa_det(). The two slowest EVSI calls are in \donttest{}. - create_dsa_twoway(): title and description said one-way. - calculate_icers_psa(): fix \code{link{...}} without backslash and the link to the non-existent make_psa_object (now make_psa_obj); the note about confidence intervals refers to plot.icers(). - check_psa_object() error message now points to make_psa_obj(). - Replace the split multi-word \keyword{} entries (beta_params, dirichlet_params, gamma_params, lnorm_params, calc_evpi, ceac, plot.evpi, plot.evppi, plot.evsi) with \keyword{distribution} and \concept{} entries. - plot.ceac() and summary.ceac() are no longer tagged internal. - Remove the stale comment in the lnorm_params() example. - Document the format and source of psa_cdiff. - Smaller doc corrections: number_ticks() returns a function, twsa() returns a twsa data frame, twsa() sa_obj points to create_dsa_twoway().
…ix and the keyword fix in lnorm_params, and both NEWS bullets Also use effect_units = "life-years" instead of "QALE" in the plot.evpi example.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 209-reference-strategy-core #252 +/- ##
============================================================
Coverage 93.83% 93.83%
============================================================
Files 18 18
Lines 2028 2028
============================================================
Hits 1903 1903
Misses 125 125
🚀 New features to boost your workflow:
|
…Jalal and Alarid-Escudero 2018) ?calc_evsi had no references. Add the Gaussian approximation paper and Strong et al. (2014) for the regression metamodel step, as ?calc_evppi does.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #212.
@evaenns, Fernando asked me to take this on so you can focus on the vignettes (#216). Could you review it? It's mostly roxygen text, so the most useful thing to check is whether each example teaches the right workflow.
Base: this PR is built on #227 (
209-reference-strategy-core), because several examples use the reference-strategy and currency features. When #227 merges, GitHub retargets this PR tomain.Examples (31 functions and methods)
I found these by comparing NAMESPACE with
man/*.Rd. Afterwards, the scan finds no exported function without an Examples section.beta_params,calc_evppi,calc_evsi,calculate_icers_psa,create_dsa_oneway,create_dsa_twoway,metamodel,number_ticks,owsa,owsa_opt_strat,owsa_tornado,twsa,run_psa,run_owsa_det,run_twsa_det.plot.ceac,plot.evpi,plot.evppi,plot.evsi,plot.exp_loss,plot.icers,plot.owsa,plot.psa,plot.twsa,predict.metamodel,print.icers,print.metamodel,print.sa,summary.ceac,summary.metamodel,summary.psa.Details:
cancer_psa_data,psa_cdiffandhund_strat, with DARTH names (l_psa,df_ceac,l_evppi,df_owsa,l_mm, …).run_psa(),run_owsa_det()andrun_twsa_det()share a 6-line two-strategy model,f_model(l_params, wtp). Its optimal strategy switches within the parameter ranges, so the one-way and two-way plots show something.create_dsa_*examples use the same model with hand-built tables.\donttest{}: the secondcalc_evsi()call (n_by_param = TRUE) and the EVSI-by-WTP call inplot.evsi. Every other example runs in under 5 s. The slowest isplot.evsiat 3.3 s, and all examples together take 17.7 s.Rd fixes from the issue
create_dsa_twoway: the title and description said one-way.calculate_icers_psa: the two\code{link{...}}were missing the backslash, and themake_psa_objectlink didn't exist.check_psa_object(): the error told users to runmake_psa(). It now saysmake_psa_obj().\keyword{}entries inbeta_params,dirichlet_params,gamma_params,lnorm_params,calc_evpi,ceacand the VOI plot methods are now@keywords distribution(a standard keyword) or@concept;plot.ceacandsummary.ceacwere exported but hidden with@keywords internal. They now appear in the reference index.lnorm_params: the stale "True values" comment is replaced by a line checking thatexp(mu + sigma^2/2)gives back the mean.psa_cdiff:@formatfor all 6 list elements,@source(Rajasingham et al. 2020, as cited in the basic_cea vignette) and an example;Smaller corrections:
number_ticksreturns a function;twsareturns atwsadata frame, not a ggplot;twsa'ssa_objnow points tocreate_dsa_twoway;run_psa's see-also;Things a reviewer may notice
print.saonpsa_cdiffprints "parameters: a data frame with rows and columns" because that dataset has no parameters. It's existing behavior. I used the dataset anyway because it's the only one with more than five strategies.predict.metamodelprints row names like1...1for one-way results. Also existing behavior.Verification
devtools::run_examples(run_donttest = TRUE)passes: 73 example files in 27.6 s, with no warnings.devtools::test(): 476 passed, 0 failed.lintr: 0 lints.lnorm_params, whose stale comment was replaced.R CMD check --as-cran: only the development-version NOTE. That includes the examples, with no keyword NOTE.The examples call
ceac()with named arguments, so they work before and after #251, which changes its argument order.