R/pvResamp.R

Defines functions pvResampFunc

# p-value using resampling method
#
# @param eps matrix of perturbations
# @param psi influence function
# @param ev non-zero eigenvalues
# @param pvMethod object of class pvMethod
#
# @return p-value of perturbed test statistic
#
# @keywords internal
pvResampFunc <- function(eps, psi, ev, pvMethod) {

  pvResamp <- apply(X = eps, 
                    MARGIN = 2L, 
                    FUN = function(x){
                            .calcPV(method = pvMethod,
                                    psi = x*psi,
                                    ev = ev)
                          })

  return( pvResamp )
}

Try the POINT package in your browser

Any scripts or data that you put into this service are public.

POINT documentation built on Oct. 2, 2023, 1:09 a.m.