sim_mp_test | R Documentation |
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
)
data |
A numeric vector |
null.dist |
The family of null distribution |
null.par |
The parameter values of the null distribution |
alter.dist |
The family of alternative distribution |
alter.par |
The parameter values of the alternative distribution |
test.level |
The level of significance of the test |
sim.size |
simulation size, increasing it will gives more accuracy. |
power |
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.
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
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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.