Description Usage Arguments Details Value Author(s) References Examples

View source: R/goodnessOfFitFunctions.R

estimates the test statistic cutoff for significance

1 2 3 4 5 6 7 8 | ```
returnCutoff(sample.size,
testcall=c("uniform", "normal", "distribution.equality"),
targetalpha=.05,
num.mc=200,
delta=0.5,
delta.equality=0.10,
pvl.Table=FALSE,
random.seed.flag=TRUE)
``` |

`sample.size` |
number of observations |

`testcall` |
Type of distribution: either uniform, normal, or distribution.equality |

`targetalpha` |
The significance level for the test. |

`num.mc` |
number of simulations to estimate distribution of statistic |

`delta` |
an option for changing the minimizing range for the EL ratio test statistic for the normal and uniform distribution. |

`delta.equality` |
an option for changing the minimizing range for the EL ratio test statistic for the two sample distribution equality |

`pvl.Table` |
logical indicating if value should be calculated based on estimates from data table or by using monte carlo techniques |

`random.seed.flag` |
logical if set seed should be set |

This function is designed to return the cut-off for significance for the statistics obtained from the density-based EL tests described in Vexler and Gurevich, 2010 and Gurevich and Vexler, 2011. The significance level for the associated cutoffs are specified by the user in 'targetalpha'.

Note 'sample.size' should be a scalar for the normal and uniform tests, but a vector of length two for 'testcall=distribution.equality' denoting the number of observations for each sample.

The 'delta' value should remain at the default value of 0.50. The 'delta' value corresponds to the 'delta' in equation 2.10 (normal) or equation 2.3.2 (uniform) in Vexler and Gurevich, 2010. Essentially this setting controls the range over which a minimum is taken to produce the EL ratio test statistic The range is from 1 to n^(1-'delta') where 'n' represents the number of observations in 'x'.

The 'delta.equality' option specifies the range over which a minimum is taken to produce the EL ratio test statistic for the two sample distribution equality test. The lower endpoint in the range is n^(0.5+delta) and upper endpoint is min(n^(1-delta),n/2) where 'n' corresponds to the number of observations. Acceptable delta values are in the interval (0,0.25).From our experiences, the two sample distribution test is rather robust to the choice of 'delta.equality'.

The 'pvl.Table' is a binary option where when TRUE, the test statistic is determined by imputation from a stored table of test statistics and significance levels for common sample sizes. If 'pvl.Table' is FALSE, then the test statistic is determined from a Monte-Carlo simulation where the number of resamplings is controlled by 'num.mc'.

Returns a statistical cutoff value to assess significance at level 'targetalpha'

Jeffrey C. Miecznikowski, Lori A. Shepherd

Jeffrey C. Miecznikowski, Albert Vexler, Lori A. Shepherd (2013). dbEmpLikeGOF: An R Package for Nonparametric Likelihood Ratio Tests for Goodness-of-Fit and Two-Sample Comparisons Based on Sample Entropy. Journal of Statistical Software, 54(3), 1-19. http://www.jstatsoft.org/v54/i03/

1 2 3 4 | ```
returnCutoff(sample.size=50, testcall="normal")
returnCutoff(sample.size=50, testcall="uniform")
returnCutoff(sample.size=10, testcall="distribution.equality")
returnCutoff(sample.size=c(10,15), testcall="distribution.equality")
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.