agreement: Assessment of Agreement

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/agreement.R

Description

Compute the concordance correlation coefficient (CCC), precision, accuracy, total deviation index (TDI), coverage probability (CP) and relative biased square (RBS) for the paired observations (test and target) based on the model proposed by Lin, Hedayat, Sinha and Yang (2002).

Usage

1
agreement(x, y, error, target, CCC_a = 0.95, TDI_a, alpha = 0.05, CP_a = 0.9, H_label = "x", V_label = "y", min = NA, max = NA, by = NA, dec = 2)

Arguments

x

A vector of the readings for the target assay or rater, it will be shown in the horizontal axis of the agreement plot

y

A vector of the readings for the test assay or rater, it will be shown in the vertical axis of the agreement plot

error

Constant or proportional error structure. Use error="const" if the error structure is constant. Then, TDI is expressed as an absolute difference with the same measurement unit as the original data. Use error="prop" if the error structure is proportional, Then, TDI is expressed as a percent change. The natural log transformation to the data will be applied.

target

target="random" or "fixed".

CCC_a

A CCC allowance, the default if CCC_a=0.95.

TDI_a

A TDI allowance which must be specified for computing CP, must be a percent value when error="prop" is specified or an absolute difference when error="const" is specified.

alpha

100(1-alpha)

CP_a

A CP allowance which must be specified for computing TDI. The default is CP_a=0.9.

H_label

Label for the horizontal axis (target) of the agreement plot. The default is H_label="x".

V_label

Label for the vertical axis (test) of the agreement plot. The default is V_label="y".

min

Minimum of the plotting range, if it is not specified, a range will be chosen automatically to show all the data point.

max

Maximum of the plotting range, if it is not specified, a range will be chosen automatically to show all the data point.

by

The increment of the plotting range. If error="const" is specified, it is the value of increment, for example, by=5. If error="prop" is specified, it is the log scale increments in between min and max. For example, if min=1 and max=64, then by=c(2,4,8,16,32). If by is not specified, it will be chosen automatically based on the error structure.

dec

Significant digits for the output. The default is dec=2.

Details

The functions summary and plot can be used to print a summary of the results and plot the observations.

Value

An object of class report is returned, which contains all the estimated statistics and their confidence limits.

Author(s)

Yue Yu <yyu@imyy.net>

References

Lawrence Lin, A. S Hedayat, Bikas Sinha, Min Yang. Journal of the American Statistical Association. March 1, 2002, 97(457): 257-270.

See Also

summary.agreement, summary.report, plot.report, html.report

Examples

1
2
3
4
5
6
7
data(DCLHb);
HemocueAve <- apply(DCLHb[,c("HEMOCUE1","HEMOCUE2")],1,mean);
SigmaAve <- apply(DCLHb[,c("SIGMA1","SIGMA2")],1,mean);

agr=agreement(y=HemocueAve,x=SigmaAve,V_label="Hemacue",H_label="Sigma",min=0,max=2000,by=250,CCC_a=0.9775,CP_a=0.9,TDI_a=150,error="const",target="random",dec=3,alpha=0.05);
summary(agr);
plot(agr);

Example output

Loading required package: R2HTML
Agreement Statistics
    CCC Precision Accuracy     TDI     CP RBS
 0.9866    0.9867   0.9999 127.487 0.9463   0

95% Confidence Limits
    CCC Precision Accuracy     TDI     CP RBS
 0.9838    0.9839   0.9989 136.388 0.9276   .

Allowance
    CCC Precision Accuracy TDI  CP RBS
 0.9775         .        . 150 0.9   .

Agreement documentation built on May 29, 2017, 3:30 p.m.