gof_test_disc_adj: This function performs a number of gof tests for discrete...

View source: R/gof_test_disc_adj.R

gof_test_disc_adjR Documentation

This function performs a number of gof tests for discrete data and finds the adjusted p value

Description

This function performs a number of gof tests for discrete data and finds the adjusted p value

Usage

gof_test_disc_adj(
  x,
  pnull,
  rnull,
  vals,
  phat = function(x) -99,
  TS,
  TSextra = NA,
  nbins = c(50, 10),
  rate = 0,
  B = c(5000, 1000),
  minexpcount = 5,
  ChiUsePhat = TRUE,
  doMethods = c("Wassp1", "W", "AD", "s-P")
)

Arguments

x

data set (the counts)

pnull

cumulative distribution function under the null hypothesis

rnull

routine to generate data under the null hypothesis

vals

a vector of values of discrete random variables

phat

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

TS

=NA, user supplied function to find test statistics

TSextra

=NA, list passed to TS, if desired

nbins

=c(50, 10) number of bins for chi-square tests

rate

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

B

=c(5000, 1000) number of simulation runs for p values and for adjusted p value

minexpcount

=5 minimal expected bin count required

ChiUsePhat

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

doMethods

Methods to include in tests

Value

A numeric matrix of test statistics and p.values


Rgof documentation built on Oct. 21, 2024, 5:07 p.m.