ekbohm.mle.test: Ekbohm’s MLE-based test under homoscedasticity

Description Usage Arguments Details Value References Examples

View source: R/ekbohm-mle-test.R

Description

ekbohm.mle.test uses Ekbohm’s MLE-based test under homoscedasticity to obtain a p-value for a partially matched pairs test.

Usage

1
ekbohm.mle.test(x, y, alternative = c("two.sided", "greater", "less"))

Arguments

x

a non-empty numeric vector containing some NA values

y

a non-empty numeric vector containing some NA values

alternative

specification of the alternative hypothesis. Takes values: "two.sided", "greater", or "less".

Details

Ekbohm’s test makes use of a modified maximum likelihood estimator and assumption of homoscedasticity. Under the null hypothesis, the resulting test statistic Z_E, follows an approximate t distribution with n1 degrees of freedom. Mathematical details are provided in [Kuan & Huang, 2013].

If proper sample size conditions are not met, then ekbohm.mle.test may exit or perform a paired or unpaired two-sample t.test, depending on the nature of the sample size issue.

If the variance of input data is close to zero, ekbohm.mle.test will return an error message.

Value

p-value associated with the hypothesis test

References

Kuan, Pei Fen, and Bo Huang. "A simple and robust method for partially matched samples using the p‐values pooling approach." Statistics in medicine 32.19 (2013): 3247-3259.

Examples

1
2
3
4
5
6
7
In the following, the true means are not equal:

x = rnorm(400, 0, 1)
x[sample(1:400, size=75, replace=FALSE)] = NA
y = rnorm(400, 0.4, 3)
y[sample(1:400, size=75, replace=FALSE)] = NA
ekbohm.mle.test(x, y, alternative = 'two.sided')

samvanderpoel/partial-pairs documentation built on Dec. 22, 2021, 10:14 p.m.