PWD_resi | R Documentation |
This routine fits the Rocke-Lorenzato precision profile model to the
residuals from the fit (via PWD_inference
).
PWD_resi(true, resi, epsilon=1e-5, printem=FALSE)
true |
the vector of values used to predict the precision – commonly X, |
resi |
the vector of residuals whose variance is thought to be a function of “true”, |
epsilon |
optional (default of 1e-5) - convergence tolerance limit, |
printem |
optional - if TRUE, routine will print out results as a |
The Rocke-Lorenzato precision profile model is
SD^2 = \sigma_r^2 + (\kappa_r\cdot true)^2
for the residuals from a precision-profile model fit.
Under this model, the approach for reviewing residuals is to fit a
variance profile model to the residuals r_i
themselves.
This function includes a check for the special cases of
constant variance (\kappa_r=0
) - in this case,
one could switch to the simpler unweighted Deming model;
and of constant coefficient of variation (\sigma_r=0
) - in this case,
one could switch to the constant CV weighted Deming model.
using chi-squared tests.
A list containing the following components:
sigmar |
the estimate of |
kappar |
the estimate of |
like |
the likelihood |
scalr |
the scaled residuals |
poolsig |
the maximum likelihood estimate of |
poolkap |
the maximum likelihood estimate of |
tests |
the chi-squared test statistics for |
Pvals |
the P values for the two chi-squared tests |
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. http://dx.doi.org/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 the model and store output
RL_gh_fit <- PWD_get_gh(X,Y,printem=FALSE)
# run the residual analysis from the model output
post <- PWD_resi(X, RL_gh_fit$resi, printem=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.