Changelog
mcprofile 1.1-0
Changes in results
hoa()now computes the modified likelihood root correctly for contrasts with more than one nonzero coefficient, such as averages, trends or Tukey-type comparisons in models with correlated coefficients. Previously the nuisance information was taken from a sub-block of the covariance matrix, which is only correct for contrasts that select a single coefficient. Adjusted statistics, intervals and p-values change for such contrasts, in some cases by as much as the whole higher-order correction. Pairwise contrasts in cell-means models (for example the Dunnett example in the vignette) were nearly unaffected.hoa()also uses the working weights at the final constrained fit, which changes its results slightly (up to about 1e-4) for all contrasts.hoa()no longer discards every profile point for larger data sets.
Bug fixes
plot()failed for intervals fromconfint(..., alternative = "less").expit()is now an exported generic, soexpit(confint(...))transforms intervals to the probability scale as documented.mcprofile()failed when all grid points lay on one side of the estimate.mcprofile()forlmobjects failed when the data, weights or formula were defined inside a function, or when the data had the same name as an argument ofmcprofile()(for exampleCM).confint()now checksadjustandalternative. A misspelledalternativepreviously gave a confusing error, or could silently return an unrelated object calledcifrom the workspace as the intervals. Unambiguous abbreviations such asalternative = "g"are now accepted.summary()validatesadjustandalternativethe same way, and also accepts unambiguous abbreviations.mcprofile()now gives a clear error for models with aliased (NA) coefficients, and for a contrast matrix with the wrong number of columns.When a profile cannot be interpolated (for example with fewer than four profile points),
confint(),summary()andplot()give one warning naming the affected contrasts, whose results areNA. Previously an error message was printed to the console without a warning.
Other changes
ggplot2 is now imported instead of attached, so
library(mcprofile)no longer puts ggplot2 functions on the search path.plot()still returns ggplot objects; calllibrary(ggplot2)to modify them, for example with+ ylim(-5, 5).Profiling is faster: each constrained fit solves the quadratic program once per iteration, and the starting values on each side of the estimate are chosen better.
Requires ggplot2 3.4.0 or later.
plot()for intervals no longer uses the deprecatedgeom_errorbarh().The citation uses
bibentry().Added a test suite.