propagate 1.3-0 (09-11-2026)
New Functions:
* 'propagateMV': uncertainty propagation for several output quantities (GUM Supplement 2, JCGM 102:2011) by the GUM uncertainty framework (covariance matrix of the outputs) and by the Monte Carlo method on a common input sample, with coverage factors of ellipsoidal and rectangular coverage regions, print/summary/plot methods. Uses 'propagate' internally, so that all input types and MC input models are available.
* 'corDist': correlated Monte Carlo input samples with arbitrary margins (normal, t, rectangular, triangular, arcsine, curvilinear trapezoidal, any sampler function or sample of values), joined by a Gaussian copula with Pearson (NORTA) or copula correlation; the samples carry their uncertainty budget and are used with propagate(..., type = "sim", cov = "full").
* 'conformity': conformity assessment with measurement uncertainty (JCGM 106:2012). Conformance probability of a measured item from the Monte Carlo output or the GUF of a 'propagate' object, guarded acceptance limits, and global consumer's/producer's risks of a production process with capability indices (Cp, Cpk, DPMO). Decision rules with the expanded uncertainty (ISO 14253-1, ASME B89.7.3.1, VDA 5; arguments 'rule', 'p', 'interval'): acceptance, rejection and uncertainty zones and the decision for a single item; accepted, rejected and undecided fractions with consumer's and producer's risks of each rule for a production process. Print and plot methods (density with conforming/non-conforming parts, zone bars of the decision rules).
* 'report': PDF report of one or several evaluations by 'propagate', about two pages each: measurement model, input data with distributions and Type A/B, result statements of the GUF and the MCM, results of all methods, validation of the GUF by the MCM (with the MC coverage of the GUF interval), numerical accuracy of the MC results, nonlinearity of the model and shape of the output, uncertainty budget with first-order and Sobol' indices, histogram with Q-Q plot and convergence trace, sensitivity coefficients and Hessian matrix, covariance check, optional conformity assessment ('conformity') and comparison with gauge values ('gauge.mean', 'gauge.u'), and a reproducibility record ('seed').
* 'doGauge': runs the gauge demos (see below) and writes their complete output (code and results) as HTML or PDF, with every comparison against a published value marked as PASS, NOTE (documented discrepancy of the publication) or DIFF, and returns a summary table. Base R only, no pandoc needed.

New Demos:
* Eight demos reproduce published examples of measurement uncertainty evaluation and compare each recomputable value with the published one: 'JCGM100' (GUM, Annex H, H.1 - H.6), 'JCGM101' (GUM Supplement 1, clause 9), 'JCGM102' (GUM Supplement 2, clause 9), 'JCGM106' (Chapters 7-9), 'EMUE' (EMUE Compendium), 'NIST1900' (NIST Technical Note 1900, examples with a measurement equation), 'QUAM' (EURACHEM/CITAC Guide CG 4, Appendix A) and 'COPULA' (correlated inputs with 'corDist': JCGM 101, 9.4.3, Possolo 2010 and exact results). Run with e.g. demo("JCGM101", package = "propagate") or all at once with 'doGauge' (365 PASS, 15 NOTE, 0 DIFF).

New Vignette:
* 'propagate-workflow': the complete workflow on one nonlinear example (makeDat - propagate - summary - sobol - plot - fitDistr - conformity - report), plus 'predictNLS', 'propagateMV' and 'doGauge'. The former vignettes are replaced by the demos and 'doGauge'.

New Datasets:
* 'H.1', 'H.5', 'H.6' (GUM, Annex H), 'S1.9.3', 'S1.9.5' (GUM Supplement 1), 'S2.9.4', 'S2.9.5' (GUM Supplement 2), 'TN.E2', 'TN.E11' (NIST TN 1900) and 'QUAM.A4', 'QUAM.A5' (EURACHEM QUAM), as raw data, summary data or uncertainty budgets for 'makeDat'. All datasets, including 'H.2', 'H.3' and 'H.4', are documented on one help page ('?datasets').

Updated Functions:
* 'propagate':
  1) new argument 'mc.margins' for the Monte Carlo input distribution of Type A quantities: "S1" (default), scaled and shifted t-distributions with scale u and individual degrees of freedom (JCGM 101:2008, 6.4.9), correlated inputs joined by a Gaussian copula; "mvt", the multivariate t-distribution of JCGM 102:2011, 5.3.2, for jointly observed inputs. The t-margins of versions <= 1.2-0, rescaled to the variance u^2, were removed, because they made MC coverage intervals for inputs from few indications too narrow; MC intervals of earlier versions for such inputs should be recomputed (GUF results are not affected).
  2) The Gaussian copula always uses the individual DOFs per input; 'df.tot' now only sets the coverage factor k.
  3) MC coverage intervals are calculated exactly as in GUM Supplement 1 (7.7.2), including the new shortest coverage interval ('ci.short'); numerical standard uncertainties of the MC results from 10 blocks ('sim.se').
  4) Adaptive Monte Carlo procedure of GUM Supplement 1 (7.9): new arguments 'adaptive', 'ndig', 'max.nsim' and 'ad.interval'.
  5) type = "sim" uses the uncertainty budget of samples from 'makeDat(..., output = "sim")' or 'corDist' for the GUF.
  6) Effective DOFs for correlated inputs according to Willink (2007); new argument 'ws.group' for jointly observed inputs. Raw data with cov = "full" now use n - 1 degrees of freedom.
  7) DOF <= 2 and DOF = Inf are handled correctly; an external covariance matrix is reordered to the columns of 'data'; the call and the uncertainty budget are stored in the result.
  8) Moments extension: new 'u.2m' in 'prop', the second-order uncertainty with the skewness and excess kurtosis of each input (component 'moments'; exact for quadratic models with independent inputs); 'summary' prints u.1, u.2, u.2m and u.MC side by side, and the second-order budget and the nonlinearity share (also in 'report') use the input moments.
* 'summary.propagate' validates the GUM uncertainty framework by the MCM (GUM Supplement 1, Sec. 8), including a check of the numerical stability, and compares the MC input with the covariance matrix of the chosen input model. New console uncertainty budgets with bars (first order, replacing the relative contributions, and second order for models with a non-zero Hessian: main effects 1/2 h_ii^2 u_i^4, interactions h_ij^2 u_i^2 u_j^2, correlations), a section on the nonlinearity of the model (share of the second-order terms in u.2m^2 and shift (mean.2 - mean.1)/u.1) and a note on inputs with c_i = 0 that contribute only through second-order terms; new arguments 'sort' and 'width'.
* 'WelchSatter' implements the generalization of Willink (2007) for correlated components (arguments 'cov', 'group', 'method'). Effective DOFs < 3 are no longer set to 3, which gave too small coverage factors.
* 'fitDistr' fits by maximum likelihood (method = "mle", default) with BIC, AIC and Schwarz weights; the histogram fit is kept as method = "nls". Eight new distributions (also in 'rDistr'): 3P log-normal, 3P gamma, rectangular-normal convolution, exponential power, skew-t, Rice, folded normal, two-component normal mixture. Fixed RSS, weighted BIC and the output order when using 'distsel'.
* 'predictNLS' samples coefficients and residual term from a multivariate t-distribution with n - p DOFs, so that intervals of linear models equal those of 'predict.lm'. Models with several predictors work (they failed before), and 'newerror' may also be a covariance matrix or a list of covariance matrices for correlated predictor errors. The coverage factor of the GUF interval accounts for predictor uncertainties: coefficients and residual term form one component with n - p degrees of freedom (Willink 2007), combined with the predictor errors by the generalized Welch-Satterthwaite formula. Without predictor errors, the results are unchanged. Fixed interval = "none".
* 'mixCov' accepts vectors of any length and names the rows and columns per argument.
* 'makeDat' imports data from files (.csv, .txt, .xlsx) or data frames, either as columns of repeated observations or as an uncertainty budget (one row per input quantity, with u, U/k or half-widths and distributions), returned as summary data or as samples from the stated distributions.
* 'sobol': corrected the "sobol" and "homma" estimators, outputs are centred (essential if mean >> sd), and objects with type = "sim" are supported.
* 'stochContr' warns for correlated inputs and also returns the variance differences.
* 'interval' refines the grid minimum and maximum by bounded optimisation (new argument 'refine'), so that extrema between grid points are found; new argument 'maxgrid', input checks, a warning for non-finite evaluations, named output with the arguments of the extrema, a print method, and corrected documentation (vertex/grid method, inner approximation of the range).
* Corrected random generators: 'rctrap', 'rlaplace', 'rlevy', 'rweibull2', 'rbeta2', 'rgtrap'; 'rmises' and 'rcosine' are now exact.
* Corrected densities: 'dctrap', 'dburr', 'dmises', and all densities return 0 outside their support. 'drice' uses an asymptotic expansion for large arguments: the former version returned 0 (wrong fits) and was extremely slow for data far from zero.
* 'plot.propagate': with logx = TRUE, the coverage interval, median and mean lines are now also drawn on the log scale (they were drawn on the original scale before).
* Default parameters of 'rpareto' (scale = 1) and 'rgompertz' (shape = 1) gave degenerate samples (all zero / Inf) and were changed; 'rst' now has df = 10 as default (the variance is infinite for df = 2).
* Removed a spurious warning ('freq' is not made use of) in 'fitDistr'.
* The documentation of 'propagate' has been revised: Taylor expansion with general covariances, the two MC input models and their GUM references, and a note on why u.MC exceeds u.1 for Type A inputs.
* The whole manual has been revised for correctness and consistency (terminology, symbols, clause numbers, references with DOIs, runnable examples without attach() or fixed paths).

propagate 1.2-0 (27-06-2026)
Updated Functions:
* 'propagate' needed a random t-sampler and a drop = FALSE argument for the univariate case (no Copula), which is now included (thanks to a comment from K. Toth).

propagate 1.1-0 (08-02-2026)
New Functions:
* 'sobol': added Sobol Sensitivity Indices for a 'propagate' object in 4 different variants: "jansen", "sobol", "saltelli", "homma".

Updated Functions:
* 'propagate' has been seriously overhauled, specifically:
  1) Argument 'do.sim' has been removed, as MC simulation is now always performed. One can now select between "diag" (only variances used for propagation) or "full" (complete covariance matrix used).
  2) 'df' has been renamed to 'df.tot', as this is more explainative.
  3) 'k' has been introduced as an optional coverage factor that overrides the one obtained from WelchSatter.
  4) 'second.order = TRUE' has been removed, as second-order Taylor propagation now always takes place. Instead, with 'exp.uc' one can now choose if the "1st"- or 1st + "2nd"-order are used for calculating expanded uncertainty.
  5) The documentation has been revamped. It is now made clearer that the input is either
        a) statitical summary data with mean, SEM and potential DOF's
        b) Raw experimental data
        c) Random samples from distributions
    'propagate' now guesses the data type based on the number of rows and gives a message (just check, no override).
  6) MOST IMPORTANT: the MC simulation (GUM Supplement 1) has changed from a multivariate t-distribution with Welch-Satterthwaite-derived total DOF's to a Gaussian Copula with t-margins that have their own DOF's from
        a) either the third row from 'type' = "stat".
        b) calculated from the raw measurement values as N-1 when 'type' = "raw" or "sim".
     This setup is quite unique as the increased uncertainty from low DOF's that can be individual per measurand is now directly translated into a multivariate distribution.
     The similarity of the input parameters (mean, SEM, DOF's, covariance matrix) and of the constructed Copula are tested and printed with summary(object).

* 'summary.propagate' now has an expanded output for the new 'propagate' results, that is, it now also provides:
  1) the covariance matrix used as input for classical and MC-derived uncertainty propagation.
  2) the covariance matrix estimated from the MC evaluation.
  3) The Frobenius Norm to compare both matrices from 1) and 2).
  4) the correlation matrix used to construct the Gaussian Copula with t-margins.
  5) the correlation matrix estimated from the MC evaluation.
  6) The Frobenius Norm to compare both matrices from 4) and 5).
  7) A comparison of Copula-input and MC-derived moments/DOFs, to check for similarity and success of the Copula construction/MC sampling.
  8) Shapiro-Wilks-, Anderson-Darling- and Lilliefors-Tests with 1000-2000x subsampling have been added for robust normality estimation.

* 'bigcor' now uses the "hdf5r" framework as "ff" is somewhat outdated, and it is a bit faster. The large matrices are stored as an .h5-file on the drive.
* added 3 new distributions to 'fitdistr': Pareto, Levy, Gompertz.
* added 4 new distributions to 'rDistr': Cosine, Pareto, Levy, Gompertz.
* 'plot.propagate' now displays 4 vertical lines/borders: alpha-based confidence intervals (GUM: dashed black; MC: solid black), median (orange) and mean (green).
* 'WelchSatter' now has an argument k that can override the alpha-based coverage factor.

propagate 1.0-7 (24-05-2025)
* Updated version to make everything CRAN-compliant

propagate 1.0-6 (07-01-2018)
* Doc to 'print.propagate' has been removed (too trivial...)
* 'plot.propagate' has been changed to only display a histogram with confidence interval, median and mean; the former boxplot was not very expedient.
* added the following four distributions for 'fitDistr' and as random samplers: Burr, Chi, Inverse Chi-square and Cosine.
* 'fitDistr' has been seriously revamped: 
  1) Distribution selection is now based on BIC (not AIC), as my simulations revealed a more robust performance.
  2) We now have 32(!) distributions.
  3) All distributions are now fitted with a brute force approach so that the parameter space is exploited more efficiently.
  4) The best fit is now explicitly named by a new 'print.fitDistr' function (requested by H. Mildenberger).
  5) All density functions are now exported to be used elsewhere (requested by H. Mildenberger).
  6) The fit quality can now be inspected with a QQ-Plot that compares the empirical density with the theoretical density (requested by Hugo Mildenberger).
  7) All outputs are now sorted ascendingly by BIC.
  8) The parameter estimates are now supplemented by their standard errors.
  9) The distributions can now be selected by "distsel", e.g. c(1:10, 12, 15) (requested by Hugo Mildenberger).
  10) The BIC sorted output data frame now includes residual sum-of-squares (RSS) and mean squared error (MSE).
* predictNLS has been overhauled by the following:
  1) possible predictor errors are now to be supplied as a 'newerror =' dataframe.
  2) calculated prediction intervals now handle the 'weights' argument of the fit (weighted residuals), as requested by T. Wenseleers.
  3) The prediction intervals under 2) are created by augmenting the covariance matrix by the residual variance. Interestingly, if one supplies this augmented covariance matrix to 'rtmvt', that is we add another dimension with the residual variance of the fit, we get a 95% prediction interval when calculating the 2.5% / 97.5% quantiles. This approach is also added.

propagate 1.0-5 (24-10-2017)
Changes and bug-fixes in functions:
* 'bigcor' can now calculate correlations between a large maxtrix x and a smaller matrix/vector y similar to 'cor(x = mat1, y = mat2)', as requested by P. Waldmann.
* added literature references to the 'interval' doc.
* the objective function in 'fitDistr' now returns sqrt(weights) * residuals instead of weights * residual^2, which was not quite correct...
* added the following new continuous distributions to 'fitDistr' and as random number generators: Inverse Gaussian, Generalized Extreme Value, Inverse Gamma, Rayleigh; and 2-parameter beta, Chi-square, exponential and F-distribution for fitting.
* 'mixCov' has been simplified to handle covariance matrices and vectors containing variances.
* 'WelchSatter' now uses optional external sensitivities, which can be transferred from 'propagate'.
* 'contributions' was removed, and the "sensitivities"/"relative contributions" calculation incorporated into 'WelchSatter', which is then given in the output of 'summary.propagate'. 
* 'propagate' has been revamped and simplified. Distinction between statistical summary and raw data is now done automatically; Monte Carlo simulation is now based solely on the t-distribution with degree of freedom obtained from Welch-Satterthwaite approximation. If degrees of freedom are not supplied, the normal distribution will be used.
* added a new function 'stochContr' that conducts "stochastic contribution analysis" by calculating the change in propagated uncertainty when each of the simulated distributions is kept constant at its mean.

propagate 1.0-4 (25-09-2014)
New functions:
* added a summary function for propagate objects that includes skewness/kurtosis and Shapiro-Wilks/Kolmogorov-Smirnov tests for normality on the MC evaluations.
* added 'interval' function for uncertainty propagation based on interval arithmetics. Avoids the so-called "dependency problem" by evaluating all combinations of a sequence grid.

Changes and bug-fixes in functions:
* "use.eval" has been removed from 'propagate' because switching between evaluation in an environment or row-wise is now done automatically.
* "method" has been removed from 'propagate' because the function will now first try symbolic differentiation and automatically switch to numeric differentiaion if that fails.
* 'propagate' can now handle functions in addition to expressions. This way, one can define functions for more complicated setups, such as recurrence relations. However, Taylor expansion is not applicable in these scenarios because no automatic differentiation is possible, so only Monte Carlo simulation will be conducted.
* fixed a bug in 'predictNLS' which gave an error when the formula for 'nls' is defined outside of 'nls' and supplied as a variable to the function call (thanks to Bartosz Kostrzewa).
* print.propagate is now less verbose, because summary.propagate has been added.
* added an example in doc to 'propagate' from the Python library 'soerp' (https://pypi.python.org/pypi/soerp) for comparison purposes => exactly (to the fifth decimal) the same results. 

propagate 1.0-3 (28-02-2014)
* As the new parametrization of 'dgnorm' tended to give convergence problems (bug kindly provided by Tony C), it was included into those distributions that are initially fitted by a grid of possible starting parameters in 'fitDistr'. 
* The 'optim' function of 'fitDistr' was replaced by 'nls.lm' of the "minpack" package because it is more robust in terms of minimizing residal sum-of-squares.
* Updated 'Examples' section of 'bigcor'.

propagate 1.0-2 (27-01-2014)
* Modified 'rmises', 'rctrap' and 'rgtrap' so that a result vector is preallocated, which makes the three functions a bit faster, roughly 300000-400000 random numbers/second (3 GHz Pentium Dual Core). 
* 'colVars' and 'rowVars' are now coded in C++ using the Rcpp framework. For a row-wise calculation of variances from a matrix of 500000 rows/10 columns this takes now only 100 ms! 
* Added function 'bigcor' for creating VERY large correlation/covariance matrices, using a step-wise submatrix filling approach (Huh?). There is a corresponding blog entry to be found under http://rmazing.wordpress.com/2013/02/22/bigcor-large-correlation-matrices-in-r/.
* Generalized normal distribution 'dgnorm' now has a different parametrization that tallies with 'rgnorm' (bug kindly provided by Tony C).

propagate 1.0-1 (29-08-2013)
* First version and hence no update.