mle.hetero: Lin and Stivers's MLE-Based Test under Heteroscedasticity

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/mle.hetero.R

Description

mle.hetero is used to perform Lin and Stivers's MLE- based test under heteroscedasticity for partially matched samples, specified by giving a data frame matrix, testing hypothesis, true mean and confidence level.

Usage

1
2
3
4
5
6
7
mle.hetero(
  data,
  alternative = c("two.sided", "less", "greater"),
  mu = 0,
  conf.level = 0.95,
  ...
)

Arguments

data

a 2-by-n or n-by-2 partially matched pairs samples data frame or matrix.

alternative

a character string specifying the alternative hypothesis, must be one of "two.sided" (default), "greater" or "less". You can specify just the initial letter.

mu

a number indicating the true difference in means.

conf.level

confidence level for the returned confidence interval.

...

further arguments to be passed to or from methods.

Details

Whether the dataset input is partially matched samples will be checked. If not, appropriate hypothesis tests, such as one and two sample t-tests, will be performed instead.

Value

A list with class "htest" containing the following components:

statistic

the value of the test statistic.

parameter

the degrees of freedom of the test statistic or NA.

p.value

the p-value of the test.

conf.int

a confidence interval for the mean appropriate to the specified alternative hypothesis.

estimate

the estimated mean or difference in means.

null.value

the specified hypothesized value of the mean or mean difference.

stderr

the standard error of the mean (difference).

alternative

a character string describing the alternative hypothesis.

method

a character string indicating what type of test was performed.

data.name

a character string giving the name(s) of the data.

Author(s)

Kai Li kai.li@stonybrook.edu

References

Kuan P F, Huang B. A simple and robust method for partially matched samples using the p-values pooling approach. Statistics in medicine. 2013; 32(19): 3247-3259.

Lin P, Stivers L. On differences of means with incomplete data. Biometrika. 1974; 61(2):325-334.

See Also

t.test for the one and two-sample t-tests.

var.test for the F test to compare two variances.

shapiro.test for the Shapiro-Wilk test of normality.

wilcox.test for the one and two-sample Wilcoxon tests.

weighted.z, modified.t, corrected.z, and mle.homo for other statistical approaches for partially matched samples.

Examples

1
2
3
4
5
6
7
# pm is a sample dataset for the PMLi package

# Lin and Stivers's MLE-based test under heteroscedasticity formula interface
mle.hetero(pm, "less", conf.level = 0.99)

# p-value of Lin and Stivers's MLE-based test under heteroscedasticity
p.value1 <- mle.hetero(pm)$p.value

Garylikai/PMLi-1.0-R-Package documentation built on Dec. 28, 2021, 12:12 a.m.