RMD_test {CNPS} | R Documentation |

## RMD Test

### Description

Perform two-sample RMD test on vectors of data.

### Usage

```
RMD_test(x , y , alternative = "greater" , mu1=median(x) , mu2=median(y),
method_p="exact" , samplenum = 2000 , samplemethod = "R" , conf.level.sample = 0.95 )
```

### Arguments

`x` |
numeric vector of data values. |

`y` |
numeric vector of data values. |

`alternative` |
a character string specifying the alternative hypothesis, must be one of "two.sided" (default), "greater" or "less". |

`mu1` |
mean value of x, or median if not given |

`mu2` |
mean value of y, or median if not given |

`method_p` |
a character string specifying the method of calculating p-value, must be one of "exact" (default), "sampling". |

`samplenum` |
The number of samples |

`samplemethod` |
a discrete value indicating the method of sampling. "S" represents sample function sampling; "W" represents Cistern Sampling; "R" represents Put-back sampling. |

`conf.level.sample` |
p-value confidence level for SRS sampling |

### Details

The test is to test the difference of deviance of two samples, which has different sample means.

The arguments `samplenum`

and `samplemethod`

only work when `method_p="sampling"`

.

### Value

`method` |
the test uesd |

`stat` |
RMD of the original data. |

`pval` |
p-value for the test. |

`conf.int` |
the confidence interval for p-value(only if method_p = "sampling") |

`alternative` |
a character string describing the alternative hypothesis |

### Author(s)

Jiasheng Zhang, Feng Yu, Yangyang Zhang, Siwei Deng. Tutored by YuKun Liu and Dongdong Xiang.

### References

Higgins, J. J. (2004). An introduction to modern nonparametric statistics. Pacific Grove, CA: Brooks/Cole.

### Examples

```
## A simple example
x=c(16.55, 15.36, 15.94, 16.43, 16.01)
y=c(16.05, 15.98, 16.10, 15.88, 15.91)
RMD_test(x , y , alternative = "greater" )
```

*CNPS*version 1.0.0 Index]