LsTest {npordtests}R Documentation

Hogg, Fisher and Randles' LS Test

Description

LsTest performs LS test.

Usage

LsTest(formula, data, alpha = 0.05, na.rm = TRUE, verbose = TRUE)

Arguments

formula

a formula of the form lhs ~ rhs where lhs gives the sample values and rhs the corresponding groups.

data

a data frame containing the variables in the formula formula

alpha

the level of significance to assess the statistical difference. Default is set to alpha = 0.05.

na.rm

a logical value indicating whether NA values should be stripped before the computation proceeds.

verbose

a logical for printing output to R console.

Value

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

statistic

the LS test statistic.

mean

the mean of the LS test statistic.

variance

the variance of the LS test statistic.

Z

the standardized test statistic.

p.value

the p-value of the test.

alpha

the level of significance.

method

the character string "LS test ".

data

a data frame containing the variables in which NA values (if exist) are removed.

formula

a formula of the form lhs ~ rhs where lhs gives the sample values and rhs the corresponding groups.

Author(s)

Bulent Altunkaynak

References

Beier, F., Buning, H.(1997). An adaptive test against ordered alternatives. Computational Statistics & Data Analysis, 25:4, 441-452.

Hogg, R.V., Fisher, D.M., Randles, R.H. (1975). A Two-Sample Adaptive Distribution-Free Test. Journal of the American Statistical Association, 70:351, 656-661.

Jonckheere, A. R. (1954). A Distribution-Free k-Sample Test Against Ordered Alternatives. Biometrika, 41, 133-145.

Examples


library(npordtests)

## Data from Jonckheere (1954)
data(jdata)
LsTest(Y~X,jdata)

## Data from Lehmann (1975)
data(lehmann)
LsTest(Values~Group,lehmann)


[Package npordtests version 1.2 Index]