Learn R Programming

XICOR (version 0.4.1)

FRpredcorhalf: Compute the FR half coefficient on two vectors based on half Gamma 2.

Description

This function computes the unidimensional ranked half graph prediction coefficient between two vectors xvec and yvec.

Usage

FRpredcorhalf(xvec, yvec, tiemethod = "average")

Value

In the case simple = TRUE, function returns the value of the FR standardized coefficient.

Arguments

xvec

Vector of numeric values in the first coordinate.

yvec

Vector of numeric values in the second coordinate.

tiemethod

Choice of treatment for ties, default is the "average"

Author

Sourav Chatterjee, Susan Holmes

References

Chatterjee, S. and Holmes, S (2020) Practical observations and applications of the robust prediction coefficient.

See Also

xicor FRpredcor

Examples

Run this code
# Compute  the coefficient and compare to the xi coefficient
simulCompare <- function(n = 20, B = 1000)
{
 diffsim <- rep(0,B)
 xvec <- 1:n
 for (i in 1:B)
 {
   yvec <- sample(n,n)
   diffsim[i] <- FRpredcorhalf(xvec,yvec)-xicor(xvec,yvec)
 }
 return(diffsim)
 }

 compare1K <- simulCompare()
 summary(compare1K)


Run the code above in your browser using DataLab