# klefsjo.ifr.mc: Function to compute the Monte Carlo P-value for the observed... In NSM3: Functions and Datasets to Accompany Hollander, Wolfe, and Chicken - Nonparametric Statistical Methods, Third Edition

## Description

This is the Monte Carlo approximation to the function "klefsjo.ifr".

## Usage

 ```1 2``` ```klefsjo.ifr.mc(x, alternative = "two.sided", exact=FALSE, min.reps = 100, max.reps = 1000, delta = 10^-3) ```

## Arguments

 `x` a vector of data of length n `alternative` the direction of the alternative hypothesis. The choices are two.sided, ifr and dfr with the default value being two.sided. `exact` TRUE/FALSE value that determines whether the exact test or the large sample approximation is used if n >= 9. If n < 9 the exact test is used. The default value is FALSE, so the large sample approximation will be used unless specified not to. This is the same large sample approximation as epstein() `min.reps` the minimum number of repetitions for the Monte Carlo Approximation `max.reps` the maximum number of reps for the Monte Carlo Approximation. If the maximum number of reps has been reached, and the probability has not converged, a warning is given. `delta` the measure of accuracy for the convergence. If the probability converges to within delta, the Monte Carlo procedure stops before reaching the maximum number of reps.

## Value

The function returns a list with two elements:

 `A.star` the value of the Klefsjo statistic `p` the corresponding probability

Rachel Becvarik

## Examples

 ```1 2 3``` ```temp.data<-c(0.33925023, 0.84005767, 0.29066189, 1.95163010, 0.74536608, 0.16714902, 0.06950791, 1.14919291, 1.93210982, 1.06006126, 0.14651009, 0.28776282, 0.72242750, 1.02227211, 1.71243334) klefsjo.ifr.mc(temp.data, exact=TRUE) ```

NSM3 documentation built on April 6, 2021, 5:05 p.m.