A copy from mcr::mcreg in `mcr`

package

## Arguments

- ...
Arguments passed on to

`mcr::mcreg`

`x`

measurement values of reference method, or two column matrix.

`y`

measurement values of test method.

`error.ratio`

ratio between squared measurement errors of reference and test method, necessary for Deming regression (Default 1).

`alpha`

value specifying the 100(1-alpha)% confidence level for confidence intervals (Default is 0.05).

`mref.name`

name of reference method (Default "Method1").

`mtest.name`

name of test Method (Default "Method2").

`sample.names`

names of cases (Default "S##").

`method.reg`

regression method. It is possible to choose between five regression methods:

`"LinReg"`

- ordinary least square regression.`"WLinReg"`

- weighted ordinary least square regression.`"Deming"`

- Deming regression.`"WDeming"`

- weighted Deming regression.`"TS"`

- Theil-Sen regression.`"PBequi"`

- equivariant Passing-Bablok regression.`"PaBa"`

- Passing-Bablok regression.`"PaBaLarge"`

- approximative Passing-Bablok regression for large datasets, operating on`NBins`

classes of constant slope angle which each slope is classified to instead of building the complete triangular matrix of all N*N/2 slopes.`method.ci`

method of confidence interval calculation. The function contains four basic methods for calculation of confidence intervals for regression coefficients.

`"analytical"`

- with parametric method.`"jackknife"`

- with leave one out resampling.`"bootstrap"`

- with ordinary non-parametric bootstrap resampling.`"nested bootstrap"`

- with ordinary non-parametric bootstrap resampling.`method.bootstrap.ci`

bootstrap based confidence interval estimation method.

`nsamples`

number of bootstrap samples.

`nnested`

number of nested bootstrap samples.

`rng.seed`

integer number that sets the random number generator seed for bootstrap sampling. If set to NULL currently in the R session used RNG setting will be used.

`rng.kind`

type of random number generator for bootstrap sampling. Only used when rng.seed is specified, see set.seed for details.

`iter.max`

maximum number of iterations for weighted Deming iterative algorithm.

`threshold`

numerical tolerance for weighted Deming iterative algorithm convergence.

`na.rm`

remove measurement pairs that contain missing values (Default is FALSE).

`NBins`

number of bins used when 'reg.method="PaBaLarge"' to classify each slope in one of 'NBins' bins covering the range of all slopes

`slope.measure`

angular measure of pairwise slopes used for exact PaBa regression (see below for details).

`"radian"`

- for data sets with even sample numbers median slope is calculated as average of two central slope angles.`"tangent"`

- for data sets with even sample numbers median slope is calculated as average of two central slopes (tan(angle)).`methodlarge`

Boolean. This parameter applies only to regmethod="PBequi" and "TS". If TRUE, a quasilinear algorithm is used. If FALSE, a quadratic algorithm is used which is faster for less than several hundred data pairs.

## Examples

```
data(platelet)
fit <- mcreg(
x = platelet$Comparative, y = platelet$Candidate,
method.reg = "Deming", method.ci = "jackknife"
)
#> Jackknife based calculation of standard error and confidence intervals according to Linnet's method.
printSummary(fit)
#>
#>
#> ------------------------------------------
#>
#> Reference method: Method1
#> Test method: Method2
#> Number of data points: 120
#>
#> ------------------------------------------
#>
#> The confidence intervals are calculated with jackknife (Linnet's) method.
#> Confidence level: 95%
#> Error ratio: 1
#>
#> ------------------------------------------
#>
#> DEMING REGRESSION FIT:
#>
#> EST SE LCI UCI
#> Intercept 4.335885 1.568968372 1.2289002 7.442869
#> Slope 1.012951 0.009308835 0.9945175 1.031386
#>
#>
#> ------------------------------------------
#>
#> JACKKNIFE SUMMARY
#>
#> EST Jack.Mean Bias Jack.SE
#> Intercept 4.335885 4.336377 4.918148e-04 1.568968372
#> Slope 1.012951 1.012950 -1.876312e-06 0.009308835
#> NULL
getCoefficients(fit)
#> EST SE LCI UCI
#> Intercept 4.335885 1.568968372 1.2289002 7.442869
#> Slope 1.012951 0.009308835 0.9945175 1.031386
```