Skip to contents

Compute a p value for the test of psi <= psi0 (lower = TRUE) or psi >= psi0 (lower = FALSE)

Usage

pvalue_psi0(
  psi0,
  psi,
  psi_hat,
  psi_obs,
  maxit,
  chunksize,
  lower = TRUE,
  target,
  SSpacearr,
  logC,
  d_k
)

Arguments

psi0

The null value

psi

The function of interest

psi_hat

The vector of psi values at each element of the sample space

psi_obs

The observed estimate

maxit

Maximum iterations

chunksize

Chunk size

lower

Do a one sided test of the null that it is less than psi0, otherwise greater.

target

Stop the algorithm if p >= target (for speed)

SSpacearr

The sample space array

logC

The log multinomial coefficient

d_k

The vector of dimensions

Value

A p-value