norm_c_opt {hytest}R Documentation

Critical Value Given a Nominal Error Type I Associated with a Normal Distribution

Description

norm_c_opt is used to obtain a critical value to achieve a nominal error type I when we use a random sample from a Normal distribution.

Usage

norm_c_opt(
  alpha = 0.1,
  n = 100,
  theta0 = 0,
  sd = 1,
  c1 = 0.001,
  c2 = 0.999,
  R = 15000,
  delta = 0.005,
  tolerance = 0.01,
  max_iter = 100
)

Arguments

alpha

numeric, represents a nominal error type I. Default value is 0.1.

n

numeric, represents the size of the sample. Default value is 100.

theta0

numeric, represents the probability parameter under the null hypothesis of a sample from a Normal distribution. Default value is 0.5.

sd

numeric, represents the scale parameter of a ]Normal distribution. It is assumed known and its default value is 1.

c1

numeric, represents a lower bound to the critical value. Default value is 1e-03.

c2

numeric, represents an upper bound to the critical value. Default value is 0.99.

R

numeric, represents the number of replicates. Default value is 15000.

delta

numeric, represents a precision parameter. Default value is 0.005.

tolerance

numeric, represents a relative precision with respect a given alpha. Default value is 0.01.

max_iter

integer, represents the maximum number of iterations. Default value is 100.

Value

A list with number of replicates, sample size, nominal error type I, and empirical critical value obtained associated with a likelihood ratio statistic.

Author(s)

Carlos Alberto Cardozo Delgado <cardozorpackages@gmail.com>.

References

Casella, G. and Berger, R. (2003). Statistical Inference, Second Edition. Duxbury Press.

Hogg, R., McKean, J., and Craig, A. (2019) Introduction to Mathematical Statistic. Eighth edition. Pearson.

Examples

# Critical value when we use a random sample of size 100 from a Normal distribution
# given a nominal error type I equals to 0.1 and R = 10000
# to test H_0: theta = 0 vs H_1: theta != 0
norm_c_opt(alpha=0.1,n=100,theta0=0,sd=1,R=10000)

[Package hytest version 0.1.0 Index]