It can be used to check whether a data comes from null distribution or from the alternative distribution
sim_mp_test(
data,
null.dist = c("uniform", "normal", "lognormal", "gamma", "cauchy", "pareto", "weibull",
"rayleigh", "laplace", "beta", "binomial", "poisson", "negativebinomial",
"geometric", "t", "f", "logarithmic"),
null.par,
alter.dist = c("uniform", "normal", "lognormal", "gamma", "cauchy", "pareto",
"weibull", "rayleigh", "laplace", "beta", "binomial", "poisson", "negativebinomial",
"geometric", "t", "f", "logarithmic"),
alter.par,
test.level = 0.95,
sim.size = 1,
power = TRUE
)A list of class "momtest" will be returned having the following components:
The Method's Name
The first 6 elements of input data
The family of null distribution
The parameter values of the null distribution
The family of alternative distribution
The parameter values of the alternative distribution
The sample size
The level of the significance of the test
The Test Result, wheter the null hypotheis is rejected or not
Power of the Test
A numeric vector
The family of null distribution
The parameter values of the null distribution
The family of alternative distribution
The parameter values of the alternative distribution
The level of significance of the test
simulation size, increasing it will gives more accuracy.
A loogical vector, whether power of the test will be calculated.
This function mainly test whether data comes from the null distribution or alternative distribution. It uses the theory of the Most Powerful (MP) test. It basically uses simulation to get the p value and make the decision. Increasing sim.size give more accuracy as well as test can be failed if you increase it heavily.
sim_mp_test(rnorm(100),null.dist="normal",null.par=c(0,1),alter.dist="cauchy",alter.par=c(0,1))
sim_mp_test(rnorm(100),null.dist="nor",null.par=c(2,1),alter.dist="nor",alter.par=c(0,1))
Run the code above in your browser using DataLab