chi_power_cont: This function finds the power of various chi-square tests for...

View source: R/chi_power_cont.R

chi_power_contR Documentation

This function finds the power of various chi-square tests for continuous data

Description

This function finds the power of various chi-square tests for continuous data

Usage

chi_power_cont(
  pnull,
  ralt,
  param_alt,
  qnull = NA,
  phat = function(x) -99,
  w = function(x) -99,
  alpha = 0.05,
  Range = c(-99999, 99999),
  B = 1000,
  nbins = c(50, 10),
  rate = 0,
  minexpcount = 5,
  ChiUsePhat = TRUE
)

Arguments

pnull

function to find cdf under null hypothesis

ralt

function to generate data under alternative hypothesis

param_alt

vector of parameter values for distribution under alternative hypothesis

qnull

=NA function to find quantiles under null hypothesis, if available

phat

=function(x) -99, function to estimate parameters

w

=function(x) -99, optional weight function

alpha

=0.05, the level of the hypothesis test

Range

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

B

=1000 number of simulation runs to find power

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

minexpcount

=5 minimal expected bin count required

ChiUsePhat

=TRUE, if TRUE param is estimated parameters and no minimization is used

Value

A numeric matrix of power values.


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