power_newtest: This function estimates the power of test routines that...

View source: R/power_newtest.R

power_newtestR Documentation

This function estimates the power of test routines that calculate p value(s)

Description

This function estimates the power of test routines that calculate p value(s)

Usage

power_newtest(
  TS,
  vals = NA,
  pnull,
  ralt,
  param_alt,
  phat,
  TSextra,
  alpha = 0.05,
  B = 1000
)

Arguments

TS

routine to calculate test statistics.

vals

=NA if data is discrete, a vector of possible values

pnull

routine to calculate the cdf under the null hypothesis

ralt

generate data under altenative hypothesis

param_alt

values of parameter under the alternative hypothesis.

phat

function to estimate parameters, function(x) -99 if no parameter estimation

TSextra

list (possibly) passed to TS

alpha

=0.05 type I error.

B

= 1000 number of simulation runs to estimate the power.

Value

A matrix of power values


Rgof documentation built on April 3, 2025, 10:52 p.m.