Title: | Hypothesis Testing Based on Neyman-Pearson Lemma and Likelihood Ratio Test |
---|---|
Description: | Error type I and Optimal critical values to test statistical hypothesis based on Neyman-Pearson Lemma and Likelihood ratio test based on random samples from several distributions. The families of distributions are Bernoulli, Exponential, Geometric, Inverse Normal, Normal, Gamma, Gumbel, Lognormal, Poisson, and Weibull. This package is an ideal resource to help with the teaching of Statistics. The main references for this package are Casella G. and Berger R. (2003,ISBN:0-534-24312-6 , "Statistical Inference. Second Edition", Duxbury Press) and Hogg, R., McKean, J., and Craig, A. (2019,ISBN:013468699, "Introduction to Mathematical Statistic. Eighth edition", Pearson). |
Authors: | Carlos Alberto Cardozo Delgado [aut, cre, cph] |
Maintainer: | Carlos Alberto Cardozo Delgado <[email protected]> |
License: | GPL-3 |
Version: | 0.1.1 |
Built: | 2024-12-09 06:52:25 UTC |
Source: | CRAN |
ber_c_opt
is used to obtain a critical value to achieve a nominal error type I when we use a random sample from a Bernoulli distribution.
ber_c_opt( alpha = 0.1, n = 150, theta0 = 1, c1 = 0.001, c2 = 0.99, R = 15000, delta = 0.005, tolerance = 0.01, max_iter = 100 )
ber_c_opt( alpha = 0.1, n = 150, theta0 = 1, c1 = 0.001, c2 = 0.99, R = 15000, delta = 0.005, tolerance = 0.01, max_iter = 100 )
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 location parameter under the null hypothesis of a sample from a Bernoulli distribution. Default value is 0.5. |
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. |
A list with number of replicates, sample size, nominal error type I, and empirical critical value obtained associated with a likelihood ratio statistic.
Carlos Alberto Cardozo Delgado <[email protected]>.
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.
# Critical value when we use a random sample of size 100 from a Bernoulli distribution # given a nominal error type I equals to 0.1 and R = 12000 # to test H_0: theta = 0.7 vs H_1: theta != 0.7 ber_c_opt(alpha=0.1,n=100,theta0=0.7,R=12000)
# Critical value when we use a random sample of size 100 from a Bernoulli distribution # given a nominal error type I equals to 0.1 and R = 12000 # to test H_0: theta = 0.7 vs H_1: theta != 0.7 ber_c_opt(alpha=0.1,n=100,theta0=0.7,R=12000)
ber_errorI
is used to obtain an empirical error type I when we use a random sample from a Bernoulli distribution.
ber_errorI(c = 1, n = 150, theta0 = 0.5, R = 12000)
ber_errorI(c = 1, n = 150, theta0 = 0.5, R = 12000)
c |
numeric, represents a positive value that defines a critical region. Default value is 1. |
n |
numeric, represents the size of the sample. Default value is 100. |
theta0 |
numeric, represents the location parameter under the null hypothesis of a sample from a Bernoulli distribution. Default value is 0.5. |
R |
numeric, represents the number of replicates. Default value is 15000. |
A list with number of replicates, sample size, and critical value that were used in the calculation of error type I associated with a likelihood ratio statistic.
Carlos Alberto Cardozo Delgado <[email protected]>.
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.
# Error type I when we use a random sample of size 200 from a Bernoulli distribution, # a critical value c = 0.45 and R = 20000 to test H_0: theta = 0.7 vs H_1: theta != 0.7 ber_errorI(0.45,n=100,theta0=0.7,R=20000)
# Error type I when we use a random sample of size 200 from a Bernoulli distribution, # a critical value c = 0.45 and R = 20000 to test H_0: theta = 0.7 vs H_1: theta != 0.7 ber_errorI(0.45,n=100,theta0=0.7,R=20000)
exp_c_opt
is used to obtain a critical value to achieve a nominal error type I when we use a random sample from a Exponential distribution.
exp_c_opt( alpha = 0.1, n = 100, theta0 = 1, c1 = 0.001, c2 = 0.99, R = 15000, delta = 0.005, tolerance = 0.01, max_iter = 100 )
exp_c_opt( alpha = 0.1, n = 100, theta0 = 1, c1 = 0.001, c2 = 0.99, R = 15000, delta = 0.005, tolerance = 0.01, max_iter = 100 )
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 location parameter under the null hypothesis of a sample from a Exponential distribution. Default value is 0.5. |
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. |
A list with number of replicates, sample size, nominal error type I, and empirical critical value obtained associated with a likelihood ratio statistic.
Carlos Alberto Cardozo Delgado <[email protected]>.
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.
# Critical value when we use a random sample of size 200 from a Exponential distribution # given a nominal error type I equals to 0.1 and R = 15000 # to test H_0: theta = 2 vs H_1: theta != 2 exp_c_opt(alpha=0.1,n=200,theta0=2,R=15000)
# Critical value when we use a random sample of size 200 from a Exponential distribution # given a nominal error type I equals to 0.1 and R = 15000 # to test H_0: theta = 2 vs H_1: theta != 2 exp_c_opt(alpha=0.1,n=200,theta0=2,R=15000)
exp_errorI
is used to obtain an empirical error type I when we use a random sample from an Exponential distribution.
exp_errorI(c = 1, n = 100, theta0 = 1, R = 15000)
exp_errorI(c = 1, n = 100, theta0 = 1, R = 15000)
c |
numeric, represents a positive value that defines a critical region. Default value is 1. |
n |
numeric, represents the size of the sample. Default value is 100. |
theta0 |
numeric, represents the location parameter under the null hypothesis of a sample from an Exponential distribution. Default value is 1. |
R |
numeric, represents the number of replicates. Default value is 15000. |
A list with number of replicates, sample size, and critical value that were used in the calculation of error type I associated with a likelihood ratio statistic.
Carlos Alberto Cardozo Delgado <[email protected]>.
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.
# Error type I when we use a random sample of size 200 from an Exponential distribution, # a critical value c = 0.24 and R = 20000 to test H_0: theta = 2 vs H_1: theta != 2 exp_errorI(c=0.24,n=200,theta0=2,R=20000)
# Error type I when we use a random sample of size 200 from an Exponential distribution, # a critical value c = 0.24 and R = 20000 to test H_0: theta = 2 vs H_1: theta != 2 exp_errorI(c=0.24,n=200,theta0=2,R=20000)
gamma_c_opt
is used to obtain a critical value to achieve a nominal error type I when we use a random sample from a Gamma distribution.
gamma_c_opt( alpha = 0.1, n = 100, theta0 = 1, beta = 1, c1 = 0.001, c2 = 0.999, R = 1000, delta = 0.005, tolerance = 0.01, max_iter = 100 )
gamma_c_opt( alpha = 0.1, n = 100, theta0 = 1, beta = 1, c1 = 0.001, c2 = 0.999, R = 1000, delta = 0.005, tolerance = 0.01, max_iter = 100 )
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 Gamma distribution. Default value is 1. |
beta |
numeric, represents the scale parameter of a Gamma 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. |
A list with number of replicates, sample size, nominal error type I, and empirical critical value obtained associated with a likelihood ratio statistic.
Carlos Alberto Cardozo Delgado <[email protected]>.
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.
# Critical value when we use a random sample of size 50 from a Gamma distribution # given a nominal error type I equals to 0.1 and R = 100 # to test H_0: theta = 3 vs H_1: theta != 3 gamma_c_opt(alpha=0.1,n=50,theta0=3,beta=1,R=100)
# Critical value when we use a random sample of size 50 from a Gamma distribution # given a nominal error type I equals to 0.1 and R = 100 # to test H_0: theta = 3 vs H_1: theta != 3 gamma_c_opt(alpha=0.1,n=50,theta0=3,beta=1,R=100)
gamma_errorI
is used to obtain an empirical error type I when we use a random sample from a Gamma distribution.
gamma_errorI(c = 1, n = 150, theta0 = 1, beta = 1, R = 15000)
gamma_errorI(c = 1, n = 150, theta0 = 1, beta = 1, R = 15000)
c |
numeric, represents a positive value that defines a critical region. Default value is 1. |
n |
numeric, represents the size of the sample. Default value is 100. |
theta0 |
numeric, represents the shape parameter under the null hypothesis of a sample from a Gamma distribution. Default value is 1. |
beta |
numeric, represents the scale parameter of a Gamma distribution. It is assumed known and its default value is 1. |
R |
numeric, represents the number of replicates. Default value is 15000. |
A list with number of replicates, sample size, and critical value that were used in the calculation of error type I associated with a likelihood ratio statistic.
Carlos Alberto Cardozo Delgado <[email protected]>.
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.
# Error type I when we use a random sample of size 120 from a Gamma distribution, # a critical value c = 0.5 and R = 200 to test H_0: theta = 1.5 vs H_1: theta != 1.5 gamma_errorI(0.5,n=120,theta0=1.5,R=200)
# Error type I when we use a random sample of size 120 from a Gamma distribution, # a critical value c = 0.5 and R = 200 to test H_0: theta = 1.5 vs H_1: theta != 1.5 gamma_errorI(0.5,n=120,theta0=1.5,R=200)
geom_c_opt
is used to obtain a critical value to achieve a nominal error type I when we use a random sample from a Geometric distribution.
geom_c_opt( alpha = 0.1, n = 100, theta0 = 0.5, c1 = 0.001, c2 = 0.999, R = 15000, delta = 0.005, tolerance = 0.01, max_iter = 100 )
geom_c_opt( alpha = 0.1, n = 100, theta0 = 0.5, c1 = 0.001, c2 = 0.999, R = 15000, delta = 0.005, tolerance = 0.01, max_iter = 100 )
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 Geometric distribution. Default value is 0.5. |
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. |
A list with number of replicates, sample size, nominal error type I, and empirical critical value obtained associated with a likelihood ratio statistic.
Carlos Alberto Cardozo Delgado <[email protected]>.
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.
# Critical value when we use a random sample of size 80 from a Geometric distribution # given a nominal error type I equals to 0.1 and R = 10000 # to test H_0: theta = 0.25 vs H_1: theta != 0.25 geom_c_opt(alpha=0.1,n=80,theta0=0.25,R=10000)
# Critical value when we use a random sample of size 80 from a Geometric distribution # given a nominal error type I equals to 0.1 and R = 10000 # to test H_0: theta = 0.25 vs H_1: theta != 0.25 geom_c_opt(alpha=0.1,n=80,theta0=0.25,R=10000)
geom_errorI
is used to obtain an empirical error type I when we use a random sample from a Geometric distribution.
geom_errorI(c = 1, n = 150, theta0 = 0.5, R = 15000)
geom_errorI(c = 1, n = 150, theta0 = 0.5, R = 15000)
c |
numeric, represents a positive value that defines a critical region. Default value is 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 Geometric distribution. Default value is 0.5. |
R |
numeric, represents the number of replicates. Default value is 15000. |
A list with number of replicates, sample size, and critical value that were used in the calculation of error type I associated with a likelihood ratio statistic.
Carlos Alberto Cardozo Delgado <[email protected]>.
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.
# Error type I when we use a random sample of size 60 from a Geometric distribution, # a critical value c = 0.01 and R = 20000 to test H_0: theta = 0.5 vs H_1: theta != 0.5 geom_errorI(0.01,n=60,theta0=0.5,R=20000)
# Error type I when we use a random sample of size 60 from a Geometric distribution, # a critical value c = 0.01 and R = 20000 to test H_0: theta = 0.5 vs H_1: theta != 0.5 geom_errorI(0.01,n=60,theta0=0.5,R=20000)
gumbel_c_opt
is used to obtain a critical value to achieve a nominal error type I when we use a random sample from a Gumbel distribution.
gumbel_c_opt( alpha = 0.1, n = 100, theta0 = 1, sigma = 1, c1 = 0.001, c2 = 0.999, R = 1000, delta = 0.005, tolerance = 0.01, max_iter = 100 )
gumbel_c_opt( alpha = 0.1, n = 100, theta0 = 1, sigma = 1, c1 = 0.001, c2 = 0.999, R = 1000, delta = 0.005, tolerance = 0.01, max_iter = 100 )
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 Gumbel distribution. Default value is 0.5. |
sigma |
numeric, represents the scale parameter of a Gumbel 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. |
A list with number of replicates, sample size, nominal error type I, and empirical critical value obtained associated with a likelihood ratio statistic.
Carlos Alberto Cardozo Delgado <[email protected]>.
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.
# Critical value when we use a random sample of size 50 from a Gumbel distribution # given a nominal error type I equals to 0.1 and R = 100 # to test H_0: theta = 3 vs H_1: theta != 3 gumbel_c_opt(alpha=0.1,n=50,theta0=3,sigma=1,R=100)
# Critical value when we use a random sample of size 50 from a Gumbel distribution # given a nominal error type I equals to 0.1 and R = 100 # to test H_0: theta = 3 vs H_1: theta != 3 gumbel_c_opt(alpha=0.1,n=50,theta0=3,sigma=1,R=100)
gumbel_errorI
is used to obtain an empirical error type I when we use a random sample from a Gumbel distribution.
gumbel_errorI(c = 1, n = 150, theta0 = 0, sigma = 1, R = 15000)
gumbel_errorI(c = 1, n = 150, theta0 = 0, sigma = 1, R = 15000)
c |
numeric, represents a positive value that defines a critical region. Default value is 1. |
n |
numeric, represents the size of the sample. Default value is 100. |
theta0 |
numeric, represents the location parameter under the null hypothesis of a sample from a Gumbel distribution. Default value is 0. |
sigma |
numeric, represents the scale parameter of a Gumbel distribution. It is assumed known and its default value is 1. |
R |
numeric, represents the number of replicates. Default value is 15000. |
A list with number of replicates, sample size, and critical value that were used in the calculation of error type I associated with a likelihood ratio statistic.
Carlos Alberto Cardozo Delgado <[email protected]>.
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.
# Error type I when we use a random sample of size 150 from a Gumbel distribution, # a critical value c = 0.5 and R = 500 to test H_0: theta = 3 vs H_1: theta != 3 library(gamlss.dist) gumbel_errorI(0.5,n=150,theta0=3,R=500)
# Error type I when we use a random sample of size 150 from a Gumbel distribution, # a critical value c = 0.5 and R = 500 to test H_0: theta = 3 vs H_1: theta != 3 library(gamlss.dist) gumbel_errorI(0.5,n=150,theta0=3,R=500)
invnormal_c_opt
is used to obtain a critical value to achieve a nominal error type I when we use a random sample from a Inverse Normal distribution.
invnormal_c_opt( alpha = 0.1, n = 100, theta0 = 1, sigma = 1, c1 = 0.001, c2 = 0.999, R = 1000, delta = 0.005, tolerance = 0.01, max_iter = 100 )
invnormal_c_opt( alpha = 0.1, n = 100, theta0 = 1, sigma = 1, c1 = 0.001, c2 = 0.999, R = 1000, delta = 0.005, tolerance = 0.01, max_iter = 100 )
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 Inverse Normal distribution. Default value is 0.5. |
sigma |
numeric, represents the scale parameter of a Inverse 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. |
A list with number of replicates, sample size, nominal error type I, and empirical critical value obtained associated with a likelihood ratio statistic.
Carlos Alberto Cardozo Delgado <[email protected]>.
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.
# Critical value when we use a random sample of size 40 from a Inverse Normal distribution # given a nominal error type I equals to 0.1 and R = 80 # to test H_0: theta = 3 vs H_1: theta != 3 invnormal_c_opt(alpha=0.1,n=40,theta0=3,sigma=1,R=80)
# Critical value when we use a random sample of size 40 from a Inverse Normal distribution # given a nominal error type I equals to 0.1 and R = 80 # to test H_0: theta = 3 vs H_1: theta != 3 invnormal_c_opt(alpha=0.1,n=40,theta0=3,sigma=1,R=80)
invnormal_errorI
is used to obtain an empirical error type I when we use a random sample from a Inverse Normal distribution.
invnormal_errorI(c = 1, n = 150, theta0 = 1, sigma = 1, R = 15000)
invnormal_errorI(c = 1, n = 150, theta0 = 1, sigma = 1, R = 15000)
c |
numeric, represents a positive value that defines a critical region. Default value is 1. |
n |
numeric, represents the size of the sample. Default value is 100. |
theta0 |
numeric, represents the location parameter under the null hypothesis of a sample from a Inverse Normal distribution. Default value is 1. |
sigma |
numeric, represents the scale parameter of a Inverse Normal distribution. It is assumed known and its default value is 1. |
R |
numeric, represents the number of replicates. Default value is 15000. |
A list with number of replicates, sample size, and critical value that were used in the calculation of error type I associated with a likelihood ratio statistic.
Carlos Alberto Cardozo Delgado <[email protected]>.
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.
# Error type I when we use a random sample of size 50 from a Inverse Normal distribution, # a critical value c = 0.5 and R = 100 to test H_0: theta = 3 vs H_1: theta != 3 library(gamlss.dist) invnormal_errorI(0.5,n=50,theta0=3,R=100)
# Error type I when we use a random sample of size 50 from a Inverse Normal distribution, # a critical value c = 0.5 and R = 100 to test H_0: theta = 3 vs H_1: theta != 3 library(gamlss.dist) invnormal_errorI(0.5,n=50,theta0=3,R=100)
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.
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 )
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 )
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. |
A list with number of replicates, sample size, nominal error type I, and empirical critical value obtained associated with a likelihood ratio statistic.
Carlos Alberto Cardozo Delgado <[email protected]>.
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.
# 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)
# 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)
lognorm_errorI
is used to obtain an empirical error type I when we use a random sample from a Log Normal distribution.
lognorm_errorI(c, n = 150, theta0 = 0, sdlog = 1, R = 15000)
lognorm_errorI(c, n = 150, theta0 = 0, sdlog = 1, R = 15000)
c |
numeric, represents a positive value that defines a critical region. Default value is 1. |
n |
numeric, represents the size of the sample. Default value is 100. |
theta0 |
numeric, represents the natural logarithm of location parameter under the null hypothesis of a sample from a Log Normal distribution. Default value is 0. |
sdlog |
numeric, represents the natural logarithm of scale parameter of a Log normal distribution. It is assumed known and its default value is 1. |
R |
numeric, represents the number of replicates. Default value is 15000. |
A list with number of replicates, sample size, and critical value that were used in the calculation of error type I associated with a likelihood ratio statistic.
Carlos Alberto Cardozo Delgado <[email protected]>.
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.
# Error type I when we use a random sample of size 50 from an Log Normal distribution, # a critical value c = 0.5 and R = 500 to test H_0: theta = 0 vs H_1: theta != 0 lognorm_errorI(c=0.5,n=50,theta0=0,sdlog=1,R=500)
# Error type I when we use a random sample of size 50 from an Log Normal distribution, # a critical value c = 0.5 and R = 500 to test H_0: theta = 0 vs H_1: theta != 0 lognorm_errorI(c=0.5,n=50,theta0=0,sdlog=1,R=500)
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.
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 )
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 )
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. |
A list with number of replicates, sample size, nominal error type I, and empirical critical value obtained associated with a likelihood ratio statistic.
Carlos Alberto Cardozo Delgado <[email protected]>.
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.
# 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)
# 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)
norm_errorI
is used to obtain an empirical error type I when we use a random sample from a Normal distribution.
norm_errorI(c = 1, n = 100, theta0 = 0, sd = 1, R = 15000)
norm_errorI(c = 1, n = 100, theta0 = 0, sd = 1, R = 15000)
c |
numeric, represents a positive value that defines a critical region. Default value is 1. |
n |
numeric, represents the size of the sample. Default value is 100. |
theta0 |
numeric, represents the location parameter under the null hypothesis of a sample from a Normal distribution. Default value is 0. |
sd |
numeric, represents the scale parameter of a Normal distribution. It is assumed known and its default value is 1. |
R |
numeric, represents the number of replicates. Default value is 15000. |
A list with number of replicates, sample size, and critical value that were used in the calculation of error type I associated with a likelihood ratio statistic.
Carlos Alberto Cardozo Delgado <[email protected]>.
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.
# Error type I when we use a random sample of size 70 from an Normal distribution, # a critical value c = 0.65 and R = 20000 to test H_0: theta = 0 vs H_1: theta != 0 norm_errorI(0.65,70,theta0=0,sd=1,R=20000)
# Error type I when we use a random sample of size 70 from an Normal distribution, # a critical value c = 0.65 and R = 20000 to test H_0: theta = 0 vs H_1: theta != 0 norm_errorI(0.65,70,theta0=0,sd=1,R=20000)
pois_c_opt
is used to obtain a critical value to achieve a nominal error type I when we use a random sample from a Poisson distribution.
pois_c_opt( alpha = 0.1, n = 150, theta0 = 1, c1 = 0.001, c2 = 0.99, R = 15000, delta = 0.005, tolerance = 0.01, max_iter = 100 )
pois_c_opt( alpha = 0.1, n = 150, theta0 = 1, c1 = 0.001, c2 = 0.99, R = 15000, delta = 0.005, tolerance = 0.01, max_iter = 100 )
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 location parameter under the null hypothesis of a sample from a Poisson distribution. 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. |
A list with number of replicates, sample size, nominal error type I, and empirical critical value obtained associated with a likelihood ratio statistic.
Carlos Alberto Cardozo Delgado <[email protected]>.
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.
# Critical value when we use a random sample of size 200 from a Poisson distribution # given a nominal error type I equals to 0.1 and R = 15000 # to test H_0: theta = 2 vs H_1: theta != 2 pois_c_opt(alpha=0.1,n=200,theta0=2,R=15000)
# Critical value when we use a random sample of size 200 from a Poisson distribution # given a nominal error type I equals to 0.1 and R = 15000 # to test H_0: theta = 2 vs H_1: theta != 2 pois_c_opt(alpha=0.1,n=200,theta0=2,R=15000)
pois_errorI
is used to obtain an empirical error type I when we use a random sample from a Poisson distribution.
pois_errorI(c = 1, n = 100, theta0 = 1, R = 15000)
pois_errorI(c = 1, n = 100, theta0 = 1, R = 15000)
c |
numeric, represents a positive value that defines a critical region. Default value is 1. |
n |
numeric, represents the size of the sample. Default value is 100. |
theta0 |
numeric, represents the location parameter under the null hypothesis of a sample from a Poisson distribution. Default value is 1. |
R |
numeric, represents the number of replicates. Default value is 15000. |
A list with number of replicates, sample size, and critical value that were used in the calculation of error type I associated with a likelihood ratio statistic.
Carlos Alberto Cardozo Delgado <[email protected]>.
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.
# Error type I when we use a random sample of size 200 from an Poisson distribution, # a critical value c = 0.85 and R = 20000 to test H_0: theta = 2 vs H_1: theta != 2 pois_errorI(0.85,n=100,theta0=2,R=20000)
# Error type I when we use a random sample of size 200 from an Poisson distribution, # a critical value c = 0.85 and R = 20000 to test H_0: theta = 2 vs H_1: theta != 2 pois_errorI(0.85,n=100,theta0=2,R=20000)
weibull_c_opt
is used to obtain a critical value to achieve a nominal error type I when we use a random sample from a Weibull distribution.
weibull_c_opt( alpha = 0.1, n = 100, theta0 = 1, sigma = 1, c1 = 0.001, c2 = 0.999, R = 1000, delta = 0.005, tolerance = 0.01, max_iter = 100 )
weibull_c_opt( alpha = 0.1, n = 100, theta0 = 1, sigma = 1, c1 = 0.001, c2 = 0.999, R = 1000, delta = 0.005, tolerance = 0.01, max_iter = 100 )
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 Weibull distribution. Default value is 0.5. |
sigma |
numeric, represents the scale parameter of a Weibull 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. |
A list with number of replicates, sample size, nominal error type I, and empirical critical value obtained associated with a likelihood ratio statistic.
Carlos Alberto Cardozo Delgado <[email protected]>.
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.
# Critical value when we use a random sample of size 50 from a Weibull distribution # given a nominal error type I equals to 0.1 and R = 100 # to test H_0: theta = 3 vs H_1: theta != 3 weibull_c_opt(alpha=0.1,n=50,theta0=3,sigma=1,R=100)
# Critical value when we use a random sample of size 50 from a Weibull distribution # given a nominal error type I equals to 0.1 and R = 100 # to test H_0: theta = 3 vs H_1: theta != 3 weibull_c_opt(alpha=0.1,n=50,theta0=3,sigma=1,R=100)
weibull_errorI
is used to obtain an empirical error type I when we use a random sample from a Weibull distribution.
weibull_errorI(c = 1, n = 150, theta0 = 1, sigma = 1, R = 15000)
weibull_errorI(c = 1, n = 150, theta0 = 1, sigma = 1, R = 15000)
c |
numeric, represents a positive value that defines a critical region. Default value is 1. |
n |
numeric, represents the size of the sample. Default value is 100. |
theta0 |
numeric, represents the location parameter under the null hypothesis of a sample from a Weibull distribution. Default value is 1. |
sigma |
numeric, represents the scale parameter of a Weibull distribution. It is assumed known and its default value is 1. |
R |
numeric, represents the number of replicates. Default value is 15000. |
A list with number of replicates, sample size, and critical value that were used in the calculation of error type I associated with a likelihood ratio statistic.
Carlos Alberto Cardozo Delgado <[email protected]>.
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.
# Error type I when we use a random sample of size 150 from a Weibull distribution, # a critical value c = 0.5 and R = 500 to test H_0: theta = 3 vs H_1: theta != 3 library(gamlss.dist) weibull_errorI(0.5,n=150,theta0=3,R=500)
# Error type I when we use a random sample of size 150 from a Weibull distribution, # a critical value c = 0.5 and R = 500 to test H_0: theta = 3 vs H_1: theta != 3 library(gamlss.dist) weibull_errorI(0.5,n=150,theta0=3,R=500)