gof_power_cont: Find the power of various gof tests for continuous data.

View source: R/gof_power_cont.R

gof_power_contR Documentation

Find the power of various gof tests for continuous data.

Description

Find the power of various gof tests for continuous data.

Usage

gof_power_cont(
  pnull,
  rnull,
  ralt,
  param_alt,
  w = function(x) -99,
  phat = function(x) -99,
  TS,
  TSextra = NA,
  alpha = 0.05,
  Range = c(-Inf, Inf),
  B = c(1000, 1000),
  nbins = c(100, 10),
  rate = 0,
  maxProcessors,
  minexpcount = 5,
  ChiUsePhat = TRUE
)

Arguments

pnull

function to find cdf under null hypothesis

rnull

function to generate data under null hypothesis

ralt

function to generate data under alternative hypothesis

param_alt

vector of parameter values for distribution under alternative hypothesis

w

(Optional) function to calculate weights, returns -99 if no weights

phat

=function(x) -99, function to estimate parameters from the data, or -99 if no parameters aare estimated

TS

user supplied function to find test statistics, if any

TSextra

=NA, list provided to TS

alpha

=0.05, the level of the hypothesis test

Range

=c(-Inf, Inf) limits of possible observations, if any

B

=c(1000, 1000), number of simulation runs to find power and null distribution

nbins

=c(100,10), number of bins for chi square tests.

rate

=0 rate of Poisson if sample size is random, 0 if sample size is fixed

maxProcessors

maximum of number of processors to use, 1 if no parallel processing is needed or number of cores-1 if missing

minexpcount

=5 minimal expected bin count required

ChiUsePhat

=TRUE, if TRUE param is estimated parameter, otherwise minimum chi square method is used.

Value

A numeric matrix of power values.


Rgof documentation built on Oct. 9, 2024, 1:06 a.m.