PWD_RL | R Documentation |
This code fits the weighted Deming regression on
predicate readings (X) and test readings (Y),
with user-supplied Rocke-Lorenzato ("RL") parameters
sigma (\sigma
) and kappa (\kappa
).
PWD_RL(X, Y, sigma, kappa, lambda=1, epsilon=1e-6)
X |
the vector of predicate readings, |
Y |
the vector of test readings, |
sigma |
the RL sigma parameter, |
kappa |
the RL kappa parameter, |
lambda |
optional (default of 1) - the ratio of the X to the Y precision profile, |
epsilon |
optional - convergence tolerance limit. |
The Rocke-Lorenzato precision profile model assumes the following
forms for the variances, with proportionality constant \lambda
:
predicate precision profile model: g_i = var(X_i) = \lambda\left(\sigma^2 + \left[\kappa\cdot \mu_i\right]^2\right)
and
test precision profile model: h_i = var(Y_i) = \sigma^2 + \left[\kappa\cdot (\alpha + \beta\mu_i)\right]^2
.
The algorithm uses maximum likelihood estimation. Proportionality constant
\lambda
is assumed to be known or estimated externally.
A list containing the following components:
alpha |
the fitted intercept |
beta |
the fitted slope |
fity |
the vector of predicted Y |
mu |
the vector of estimated latent true values |
resi |
the vector of residuals |
like |
the -2 log likelihood L |
innr |
the number of inner refinement loops executed |
error |
an error code if the iteration fails |
Douglas M. Hawkins, Jessica J. Kraker krakerjj@uwec.edu
Hawkins DM and Kraker JJ. Precision Profile Weighted Deming Regression for Methods Comparison, on Arxiv (2025) doi:10.48550/arXiv.2508.02888
Hawkins DM (2014). A Model for Assay Precision. Statistics in Biopharmaceutical Research, 6, 263-269. doi:10.1080/19466315.2014.899511
# library
library(ppwdeming)
# parameter specifications
sigma <- 1
kappa <- 0.08
alpha <- 1
beta <- 1.1
true <- 8*10^((0:99)/99)
truey <- alpha+beta*true
# simulate single sample - set seed for reproducibility
set.seed(1039)
# specifications for predicate method
X <- sigma*rnorm(100)+true *(1+kappa*rnorm(100))
# specifications for test method
Y <- sigma*rnorm(100)+truey*(1+kappa*rnorm(100))
# fit RL with given sigma and kappa
RL_results <- PWD_RL(X,Y,sigma,kappa)
cat("\nWith given sigma and kappa, the estimated intercept is",
signif(RL_results$alpha,4), "and the estimated slope is",
signif(RL_results$beta,4), "\n")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.