perm_test: Tests whether each row in f(x) is equal to 0 using...

Description Usage Arguments Value

Description

Tests whether each row in f(x) is equal to 0 using permutation test

Usage

1
perm_test(f, x, x.rand = function() sample(x), n = 1000)

Arguments

f

function that takes x and produces a vector (must have the same names in same order in every trial!)

x

value of x such that f(x) gives observed value

x.rand

function that takes no arguments and gives random value of x under null hypothesis

n

number of trials

Value

two-sided P value of observed value compared to values assuming null hypothesis


agentlans/CorTools documentation built on May 8, 2019, 1:37 a.m.