Learn R Programming

hytest (version 0.1.1)

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

Description

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

Usage

lognorm_c_opt(
  alpha = 0.1,
  n = 100,
  theta0 = 1,
  sdlog = 1,
  c1 = 0.001,
  c2 = 0.999,
  R = 1000,
  delta = 0.005,
  tolerance = 0.01,
  max_iter = 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.

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 a location under the null hypothesis of a sample from a Log Normal distribution. Default value is 1.

sdlog

numeric, represents the scale parameter of a Log 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 1000.

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.

Author

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

Run this code
# Critical value when we use a random sample of size 100 from a Log Normal distribution
# given a nominal error type I equals to 0.1 and R = 200
# to test H_0: theta = 3 vs H_1: theta != 3
lognorm_c_opt(alpha=0.1,n=100,theta0=3,sdlog=1,R=200)

Run the code above in your browser using DataLab