# me.test: A homogeneity Test under the Presence of Measurement Error In MEtest: A Homogeneity Test under the Presence of Measurement Errors

## Description

This function provides the test statistic and p-value of a homogeneity test of distributions when the observations are measured with error.

## Usage

 ```1 2``` ```me.test(W, V, B = 1000, wt = c("Uniform", "Normal"), wt.bd = NULL, wt.prob = 0.99, nGL = 32) ```

## Arguments

 `W` an m_x (>= 2) by n_x matrix of observations. `V` an m_y (>= 2) by n_y matrix of observations. `B` the number of bootstrap samples. Default is 1000. `wt` type of the weight function. Uniform and standard normal distributions are available. `wt.bd` lower and upper bound of the weight function. If `wt.bd` is not specified, bounds are computed based on the deconvoluted distribution function. `wt.prob` probability used to compute lower and upper bound. Will be ignored if `wt.bd` is provided. `nGL` the number of nodes for Gaussian quadrature

## Details

Based on our extensive simulations, we recommend to use `uniform` weight function with 0.99 probability.

## Value

The output is an object of the class `htest` like in `t.test`.

 `statistic` the value of the test statistic. `p.value` the p-value for the test. `method` the character string indicating the weight function. `alternative` a character string describing the alternative hypothesis. `boundary` lower and upper bound for the weight function.

## Author(s)

DongHyuk Lee, Samiran Sinha

## References

Lee, D., Lahiri, S. N. and Sinha, S. A Test of Homegeneity of Distributions when Observations are Subject to Measurement Errors. Submitted.

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12``` ```library(statmod) set.seed(1234) n <- 200 mx <- my <- 2 X <- rnorm(n, mean = 0, sd = 1) Y <- rnorm(n, mean = 0.2, sd = 1) Ux <- matrix(rnorm(n*mx, mean = 0, sd = 0.5), ncol = mx) Uy <- matrix(rnorm(n*my, mean = 0, sd = 0.5), ncol = my) W <- X + Ux V <- Y + Uy me.test(W, V, wt = "Uniform") ```

MEtest documentation built on Aug. 20, 2019, 1:03 a.m.