NEWS.md
curve_table() honors its documented levels argument. Both branches overwrote it with a hard-coded vector, so a user-supplied value was silently discarded and every table showed the same conventional levels. The overwrite dates from the commit that introduced the function in December 2019, so the argument had never had any effect. levels now defaults to NULL, which selects the conventional set that was previously forced – existing calls, including those from curve_gen() and the other curve_*() functions, produce identical output – while a supplied vector selects those levels instead. A supplied level that matches no row in data – which depends on the steps the curve was built with – is omitted with a warning naming it; the default set is still filtered silently, as it always was. levels must now be numeric, free of missing values, and strictly between 0 and 1 when type = "c".
ggcurve() and plot_compare() use linewidth rather than size for line and border widths, which ggplot2 deprecated in 3.4.0 and which had been emitting a deprecation warning naming this package. This affects the eight annotate("rect") null-value bands in ggcurve(), the eight annotate("segment") null-value markers in plot_compare(), and two geom_line() calls. The size argument is retained where it is still correct, namely geom_point(), stat_ecdf(geom = "point"), and every element_text().
ggcurve() and plot_compare() validate type, measure and position with rlang::arg_match(). An unrecognized value used to fall through every branch and return NULL invisibly, so a typo such as type = "s1" produced no plot and no error. The permitted values now appear in each function’s signature and help page, and note that plot_compare() implements fewer types than ggcurve(): it has no "cdf" or "cd". Both help pages had also documented a "pd" type for the consonance distribution function, which neither function has ever implemented – the branch is "cdf" – and plot_compare()’s page advertised "cdf" and "cd" as well. Both are corrected.
curve_meta(method = "mv") works. The confint() call in the multivariate branch passed object = res, a name that exists only in the function’s own examples, so the branch failed with “object ‘res’ not found” unless a variable of that name happened to exist in the calling environment. It now passes the function’s x argument, as all four other method branches already did. A stray utils::globalVariables("res") declaration had kept R CMD check from reporting it.
The package no longer declares column names with utils::globalVariables(). Columns referenced inside aes() now use the .data pronoun, so a renamed or missing column fails loudly instead of silently resolving to nothing. Removing the 20 declarations showed most of the declared names were dead: only curve_compare(), curve_meta(), ggcurve(), ggplot_likelihood() and plot_compare() referenced anything at all. Two pivot_longer() calls that selected a column range (lower.limit:upper.limit and X2:X3) now name their columns explicitly.
curve_table() validates type and format with rlang::arg_match(). An unrecognized type previously left an internal object undefined and failed with an obscure error, and an unrecognized format fell through every branch to return NULL invisibly. Both now fail immediately with a message listing the permitted values, which also now appear in the function’s signature and help page.
The declared minimum R version is now 4.1.0, up from 4.0.0. The package uses the native pipe |>, which R gained in 4.1.0, so the old declaration let install.packages() proceed on R 4.0.x and then fail while parsing R/plot.likelihood_function.R. R CMD check had not caught it because the CI matrix reaches only oldrel-1.
curve_stan() builds a standard concurve object from draws of a confidence distribution – for example a generalized fiducial distribution sampled with Stan, or a bootstrap distribution – by reading the interval limits at every level off the empirical quantiles. The output works with ggcurve(), plot_compare(), and curve_table() unchanged, and requires no Stan installation.curve_stan_fit() compiles and samples a Stan program with rstan, extracts one scalar parameter, and passes the draws to curve_stan(). Compiled models are cached for the session. rstan is a Suggests dependency only: the package installs and works without it, and the function stops with an informative message if it is unavailable.concurve_stan_file() locates three Stan programs shipped as plain text in inst/stan/: normal_gfd (Hannig’s generalized fiducial distribution for the normal location-scale model, whose marginal for the mean is exactly Student-t), normal_profile (for profiling over the scale with rstan::optimizing()), and normal_mle. Nothing is compiled at install time.curve_compare() integrates an interpolant of the interval endpoints and can fail on Monte Carlo curves; use plot_compare() to compare curve_stan() output graphically.The defunct functions (plotpint(), plotsint(), ggconcurve(), plot_concurve(), meanintervals(), metaintervals(), genintervals(), corrintervals(), survintervals(), likintervals(), and rev_eng()) are now exported. They had never been, so calling one raised “could not find function” and the message naming the current replacement was unreachable. They now signal an error of class defunctError that names the function to use instead. likintervals() had a help alias but no definition at all, and man/defunct.Rd was hand-maintained and had drifted from the source; it is now generated from roxygen comments.
curve_lik_glm() now divides the profile deviance by the model’s estimated dispersion for families with a free dispersion parameter (gaussian, Gamma, inverse.gaussian, quasi*), as confint() does. Without that division the support intervals were wrong by a factor of 1 / sqrt(dispersion), which means they depended on the units of the response: refitting the same relationship with the response rescaled changed the interval. Measured against confint(), a gaussian fit with residual SD 0.4 gave intervals 219% of the correct width, and the same relationship with residual SD 5.0 gave 19% — that is, five times too narrow, overstating precision. gaussian is glm()’s default family, so an ordinary glm(y ~ x) was affected. binomial and poisson are unchanged, their dispersion being fixed at 1.
curve_lik_glm() starts each constrained refit from the full model’s fitted means and drops (with a message) grid points where the refit does not converge, instead of failing outright far in the tails of an inverse-link model.
curve_rev() no longer prints the reconstructed standard error to the console for measure = "ratio" (a leftover debugging print()).
Corrected two typos in curve_corr()’s help text, each a pair of words run together by a missing space. Both had been listed in inst/WORDLIST, which whitelisted the misspellings rather than fixing them; those entries are removed, so the spell check now guards against the typos returning.
The deviancestat column is now on the same scale in every likelihood object. curve_rev() reported the likelihood-ratio statistic D = -2 * log(L / Lmax), on the chi-squared (1 df) scale, while as_curve_lik(), curve_lik(), curve_lik_glm(), and curve_mpl() reported half of it. The four now agree with curve_rev(), which also matches the axis label plot_compare() has always used for this quantity, “2ln(MLR)”. Previously ggcurve(type = "d") and plot_compare(type = "d") could overlay two curves differing by a factor of two with no indication, and a deviance read off a curve_lik_glm() plot could not be compared against a chi-squared cutoff such as 3.84. Deviance values from those four constructors are now twice their former size; relative likelihoods, support intervals, and curve_support() are unaffected.
ggcurve(), curve_gen(), curve_mean(), curve_table(), plot_compare(), plot_multi(), curve_from_ratio(), and curve_from_se() now run, so R CMD check executes them and their output appears in the reference documentation. Two of those blocks were broken and could never have worked: plot_multi() documented curve_from_se(point =, se =, df =), which are not its arguments, and curve_from_ratio() passed nullvalue = TRUE for a ratio measure, where the null value is 1.plot_multi() uses the .data pronoun in its aes() calls instead of declaring column names via utils::globalVariables(), so a renamed or missing column now fails loudly instead of resolving to nothing.LazyData: true from DESCRIPTION; the package ships no data/ directory.curve_table() documents its return value. The help page had no \value section, although the function returns four different kinds of object depending on format: a concurve data frame, a knitr_kable, a flextable, or the result of printing a flextable to a temporary Word or PowerPoint document.curve_mean() spells out TRUE and FALSE instead of the T and F abbreviations, in the paired default and in three internal sample(replace = ) calls. The values are unchanged; T and F are ordinary bindings that calling code can rebind, so the abbreviations were not safe.\tabular{} block containing a \figure{}{options: width="50"} directive, which produced an \includegraphics width with no valid LaTeX unit. Package version, date, and license are taken from DESCRIPTION as usual.man/figures/ (a 7 MB animated logo, several large curve PDFs/SVGs, and stray files) and uncited SVGs from vignettes/. None were referenced by any help page, vignette, or README.survival, survminer, ProfileLikelihood, and officer are declared in Suggests rather than Imports: no function in R/ calls them; they are used only in vignettes, examples, and tests (which already guard with requireNamespace() / skip_if_not_installed()). This clears the “All declared Imports should be used” NOTE.curve_analytic() computes consonance intervals directly from closed-form quantile functions (z, t, Fisher-z correlation, chi-squared variance, Wilson-score proportion) instead of numerically inverting confint() thousands of times, and is typically orders of magnitude faster.curve_region() computes the confidence-distribution probability that a parameter lies in an arbitrary region, from any concurve intervals data frame, along with the counternull value for a supplied null.construct_likelihood() builds likelihood, log-likelihood, score, information, and profile-likelihood functions directly from lm()/glm() objects (or from scratch), with coef(), vcov(), logLik(), confint(), summary(), and plot() methods.as_curve_lik(), curve_lik_glm(), and curve_lik_exact() construct native likelihood functions – from any grid of parameter values and log-likelihood, by direct profiling of a model coefficient, or exactly for common designs (proportions, odds ratios, rate ratios, means, variances, correlations) – with no dependency beyond base R and stats.curve_support() computes likelihood/support intervals at arbitrary relative-likelihood cutoffs.ggplot_likelihood(), plotly_likelihood(), plot_all_parameters(), plot_ci_levels(), and plot_profile_vs_wald() add ggplot2 and interactive plotly output, multi-parameter panels, and profile-vs-Wald comparison plots for construct_likelihood() objects.curve_wrap() is a generic wrapper that constructs consonance functions from any function that produces confidence intervals.curve_from_ratio() and curve_from_se() construct consonance functions from a published ratio estimate, or from a point estimate and its standard error.curve_overlap() quantifies the area of overlap between two consonance functions.curve_summary() summarizes a consonance function at a set of confidence levels.plot_multi() overlays consonance or surprisal functions from several analyses on one plot.pbmcapply dependency, replaced with base R.curve_gen() was only ever defined when installed on Windows or macOS, due to a check of the installing machine’s OS; on Linux the function did not exist at all and the package could not be installed. It is now a single function that dispatches at call time instead.plot_compare() was missing its @export tag and so was not actually callable after a normal installation, despite being documented and used in several articles.boot, dplyr, tibble, lme4, metafor, flextable, ggplot2, and scales without namespace-qualifying them; depending on which packages happened to already be loaded in a session, these could fail with “could not find function” after a clean install. All such calls are now namespace-qualified.rlang and numDeriv were used internally but not declared as dependencies; plotly is now declared as a Suggested package.log option added to curve_gen() to exponentiate the coefficients.
title fully added to ggcurve()
curve_gen() now includes options to adjust CIs and P-values for multiple comparisons.curve_gen() can now accept inputs from the rms package’s ols() function.
lm option that is typically used.curve_rev() for continuous variables due to instability.lme4.curve_table() to produce outputs from the functions.curve_rev() was fixed where for the default measure, the computations were calculated as if measure was set to ratio.
curve_rev() can now take summary statistics such as the point estimate and it’s standard error to back calculate the function.
curve_boot() now takes an option allowing users to specify the number of cores to be used.ggcurve() and plot_compare() now have the options to customize the second y-axis and also change the color of the outline of the functions.
yaxis has been replaced by yaxis1 and yaxis2.plot_compare() color has been replaced by color1 and color2
curve_meta() can now handle complex data structures from metafor with clustered data.curve_gen() can now handle ANOVAs and robust linear regressions from the MASS package.concurve is now intergrated with the cowplot package for easier graphing.tibble::tibble() integration due to breakage in code.expand_scale() has been replaced with expansion() within the inner workings of ggcurve() and plot_compare() due to the former function (expand_scale()) being deprecated.curve_lmer() for mixed-effects modelscurve_meta() could not utilize rma.mh() or rma.peto() from metafor.curve_boot() can utilize parametric Bca bootstrap methods to compute functions.curve_boot() tables was incorrect.curve_meta() tables was incorrect.R to 3.5.0.install.packages("concurve", dep = TRUE) as solution to installation problems for some individuals.MASS, compiler, and Rlang from DESCRIPTION IMPORTS, since these weren’t used.ggcurve() theme has been changed from theme_bw() to theme_minimal().ggconcurve() is now ggcurve().ggcurve() plots confidence (consonance) distributions, densities, likelihood, and deviance functions.plot_curve() is now deprecated. Please use ggcurve() instead.curve_compare() compares two functions and calculates the area between the curve.plot_compare()allows two separate functions to be plotted and compared simultaneously.curve_table() produces publication-ready tables of relevant statistics.curve_boot() uses bootstrapping to approximate the consonance functions via the boot and bcaboot packages.curve_lik() produces likelihood functions by transforming the objects from the ProfileLikelihood package.ggconcurve() now plots both the P-values and CI level using both y-axes when the type = “consonance”. Previously, this was only possible via plot_concurve() (which uses base R graphics) because ggplot2 had a bug in its last few versions, which inhibited proper transformations in the y-axis.plot_concurve() now has “measure” as an item which allows for ratio measures to be logarithmically scaled on the x axis. There are two options, “default”, which is set as the default option and is for mean differences, and “ratio”, which will result in the axis being logarithmically scaled.plot_concurve() also now has a “fill” option which will allow users to choose the color of the plot.plotpint() function which plotted consonance functions has been repackaged into ggconcurve().plotsint() function which plotted surprisal functions has been repackaged into ggconcurve().plot_concurve() function.ggconcurve().ggconcurve() function to show how much of the interval surrounds it.mclapply() function from the parallel package.corrintervals() function.rev_eng() function.plotpint() or plotsint() function now able to take custom titles, subtitles, x-axis titles, and captions.Stata.