Title: | Nonparametric Tests for Equality of Location Against Ordered Alternatives |
---|---|
Description: | Performs nonparametric tests for equality of location against ordered alternatives. |
Authors: | Bulent Altunkaynak [aut, cre], Hamza Gamgam [aut] |
Maintainer: | Bulent Altunkaynak <[email protected]> |
License: | GPL (>= 2) |
Version: | 1.2 |
Built: | 2024-11-01 11:45:51 UTC |
Source: | CRAN |
AtTest
performs the Adaptive Test.
AtTest(formula, data, alpha = 0.05, na.rm = TRUE, verbose = TRUE)
AtTest(formula, data, alpha = 0.05, na.rm = TRUE, verbose = TRUE)
formula |
a formula of the form |
data |
a data frame containing the variables in the 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. |
A list with class "owt" containing the following components:
statistic |
the Adaptive test statistic. |
mean |
the mean of the Adaptive test statistic. |
variance |
the variance of the Adaptive test statistic. |
Z |
the standardized test statistic. |
p.value |
the p-value of the test. |
alpha |
the level of significance. |
method |
the character string "Adaptive test". |
data |
a data frame containing the variables in which NA values (if exist) are removed. |
formula |
a formula of the form |
Bulent Altunkaynak
Beier, F., Buning, H.(1997). An adaptive test against ordered alternatives. Computational Statistics & Data Analysis, 25:4, 441-452.
Jonckheere, A. R. (1954). A Distribution-Free k-Sample Test Against Ordered Alternatives. Biometrika, 41, 133-145.
library(npordtests) ## Data from Jonckheere (1954) data(jdata) AtTest(Y~X,jdata) ## Data from Lehmann (1975) data(lehmann) AtTest(Values~Group,lehmann)
library(npordtests) ## Data from Jonckheere (1954) data(jdata) AtTest(Y~X,jdata) ## Data from Lehmann (1975) data(lehmann) AtTest(Values~Group,lehmann)
This real data is reported by Chang and Yen (2011). Eighteen chicks were randomly assigned to three treatments with six chicks in each for balanced data.
data("chicks")
data("chicks")
A data frame with 18 observations on the following 2 variables.
diet
Diets of different protein content
weight
Chicks' weight (in grams)
Treatment 1 (Diet 1) had the diet with the lowest level of protein; treatment 2 (Diet 2) had the diet with a medium level of protein; and treatment 3 (Diet 3) had the diet with the highest level of protein. Does the average weight of chicks increase with the amount of protein? Hypothesis is being investigated.
Chang, C. H. and Yen, C.H. (2011). A Nonparametric Test for the Ordered Alternative Based on Fast Discrete Fourier Transform Coefficient. Journal of Testing and Evaluation, 39:6, 1131-1143.
library(npordtests) data(chicks) levels(chicks$diet) <- c("diet 1", "diet 2", "diet 3") boxplot(weight~diet,data=chicks,xlab="Diet")
library(npordtests) data(chicks) levels(chicks$diet) <- c("diet 1", "diet 2", "diet 3") boxplot(weight~diet,data=chicks,xlab="Diet")
FtmTest
performs FTM test.
FtmTest(formula, data, alpha = 0.05, na.rm = TRUE, verbose = TRUE)
FtmTest(formula, data, alpha = 0.05, na.rm = TRUE, verbose = TRUE)
formula |
a formula of the form |
data |
a data frame containing the variables in the 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. |
A list with class "owt" containing the following components:
statistic |
the FTM test statistic. |
mean |
the mean of the FTM test statistic. |
variance |
the variance of the FTM test statistic. |
Z |
the standardized test statistic. |
p.value |
the p-value of the test. |
alpha |
the level of significance. |
method |
the character string "FTM test". |
data |
a data frame containing the variables in which NA values (if exist) are removed. |
formula |
a formula of the form |
Bulent Altunkaynak
Ferdhiane, R., Terpstra, J., Magel, R.C. (2008). A nonparametric test for the ordered alternative based on Kendall's correlation coefficient. Communications in Statistics-Simulation and Computation, 37:6, 1117-1128.
Jonckheere, A. R. (1954). A Distribution-Free k-Sample Test Against Ordered Alternatives. Biometrika, 41, 133-145.
library(npordtests) ## Data from Jonckheere (1954) data(jdata) FtmTest(Y~X,jdata)
library(npordtests) ## Data from Jonckheere (1954) data(jdata) FtmTest(Y~X,jdata)
GcTest
performs Gaur's Gc test.
GcTest(formula, data, alpha = 0.05, na.rm = TRUE, verbose = TRUE, c = 2)
GcTest(formula, data, alpha = 0.05, na.rm = TRUE, verbose = TRUE, c = 2)
formula |
a formula of the form |
data |
a data frame containing the variables in the 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. |
c |
a integer value chosen from |
A list with class "owt" containing the following components:
statistic |
the Gaur's Gc test statistic. |
mean |
the mean of the Gaur's Gc test statistic. |
variance |
the variance of the Gaur's Gc test statistic. |
Z |
the standardized test statistic. |
p.value |
the p-value of the test. |
alpha |
the level of significance. |
method |
the character string "Gaur's Gc test ". |
data |
a data frame containing the variables in which NA values (if exist) are removed. |
formula |
a formula of the form |
Bulent Altunkaynak
Gaur, A., (2017). A class of k-sample distribution-free tests for location against ordered alternatives. Communications in Statistics-Theory and Methods, 46:5, 2343-2353.
Jonckheere, A. R. (1954). A Distribution-Free k-Sample Test Against Ordered Alternatives. Biometrika, 41, 133-145.
library(npordtests) ## Data from Jonckheere (1954) data(jdata) GcTest(Y~X,jdata) ## Data from Lehmann (1975) data(lehmann) GcTest(Values~Group,lehmann)
library(npordtests) ## Data from Jonckheere (1954) data(jdata) GcTest(Y~X,jdata) ## Data from Lehmann (1975) data(lehmann) GcTest(Values~Group,lehmann)
This data collected by Pedersen et al. (2008) was taken from Terpstra et al. (2011). The data are calculated from doppler waveforms corresponding to 66 patients who were scheduled for a percutaneous liver needle biopsy.
data("hvwi")
data("hvwi")
A data frame with 66 observations on the following 2 variables.
Group
Fibrosis groups: A
:cirrhosis, B
:severe, C
:moderate, D
:mild and E
:none
Values
HVWI values for the five fibrosis groups
Terpstra, J. T., Chang, C. H. and Magel, C. M. (2011). On the use of Sperman's correlation coefficient for testing ordered alternatives. Journal of Statistical Computation and Simulation, 81:11, 1381-1392.
Pedersen, J. F., Madsen, L. G., Vibeke, A. L. Hamberg, O., Horn, T., Federspiel, B. and Bytzer, P. (2008). A doppler waveform index to characterize hepatic vein velocity pattern and evaluate hepatic fibrosis. J. Clin. Ultrasound, 36:4, 208-211.
data(hvwi) levels(hvwi$Group) <- c("cirrhosis", "severe", "moderate", "mild", "none") boxplot(Values~Group,data=hvwi,xlab="Fibrosis group",ylab="HVWI value")
data(hvwi) levels(hvwi$Group) <- c("cirrhosis", "severe", "moderate", "mild", "none") boxplot(Values~Group,data=hvwi,xlab="Fibrosis group",ylab="HVWI value")
This data presented by Dmitrienko et al. (2006) is to examine the effect of different drug doses on diastolic blood pressure.
data("hypertension")
data("hypertension")
A data frame with 68 observations on the following 2 variables.
doseLevel
Dose levels: A
: Placebo, B
: Dose 10 mg/day, C
: Dose 20 mg/day, D
: Dose 40 mg/day
rdbp
Mean reduction in diastolic blood pressure
Patients with hypertension were randomized into four groups with different dose levels, 0, 10, 20, and 40 mg/day, where the group with 0 mg/day was the placebo group. The number of patients in each group were 17, 17, 18, and 16, respectively. The complete data can be found at the Dmitrienko et al.(2006) or Shan et al. (2014).
Dmitrienko, A., Chuang-Stein, C. and D’Agostino, R. (2006). Pharmaceutical Statistics Using SAS: A Practical Guide (SAS Press). SAS Institute, 1 edition.
Shan, G., Young, D. and Kang, L. (2014). A New Powerful Nonparametric Rank Test for Ordered Alternative Problem. PLoS ONE, 9:11, doi:10.1371/journal.pone.0112924.
data(hypertension) levels(hypertension$doseLevel) <- c("placebo", "10", "20", "40") boxplot(rdbp~doseLevel,data=hypertension,xlab="Dose level",ylab="Mean reduction in dbp")
data(hypertension) levels(hypertension$doseLevel) <- c("placebo", "10", "20", "40") boxplot(rdbp~doseLevel,data=hypertension,xlab="Dose level",ylab="Mean reduction in dbp")
This synthetic data is reported by Jonckheere (1954). The data consists of 4 groups with 4 observations in each.
jdata
jdata
A data frame with 16 observations on the following 2 variables.
X
Number of samples
Y
Value
Jonckheere, A. R. (1954). A Distribution-Free k-Sample Test Against Ordered Alternatives. Biometrika, 41, 133-145.
library(npordtests) data(jdata) levels(jdata$X) <- c("I", "II", "III", "IV") boxplot(Y~X,data=jdata,xlab="Groups")
library(npordtests) data(jdata) levels(jdata$X) <- c("I", "II", "III", "IV") boxplot(Y~X,data=jdata,xlab="Groups")
JtTest
performs JT test.
JtTest(formula, data, alpha = 0.05, na.rm = TRUE, verbose = TRUE)
JtTest(formula, data, alpha = 0.05, na.rm = TRUE, verbose = TRUE)
formula |
a formula of the form |
data |
a data frame containing the variables in the 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. |
A list with class "owt" containing the following components:
statistic |
the JT test statistic. |
mean |
the mean of the JT test statistic. |
variance |
the variance of the JT test statistic. |
Z |
the standardized test statistic. |
p.value |
the p-value of the test. |
alpha |
the level of significance. |
method |
the character string "JT test". |
data |
a data frame containing the variables in which NA values (if exist) are removed. |
formula |
a formula of the form |
Bulent Altunkaynak
Jonckheere, A. R. (1954). A Distribution-Free k-Sample Test Against Ordered Alternatives. Biometrika, 41, 133-145.
library(npordtests) ## Data from Jonckheere (1954) data(jdata) JtTest(Y~X,jdata) ## Data from Lehmann (1975) data(lehmann) JtTest(Values~Group,lehmann)
library(npordtests) ## Data from Jonckheere (1954) data(jdata) JtTest(Y~X,jdata) ## Data from Lehmann (1975) data(lehmann) JtTest(Values~Group,lehmann)
KtpTest
performs KTP test.
KtpTest(formula, data, alpha = 0.05, na.rm = TRUE, verbose = TRUE)
KtpTest(formula, data, alpha = 0.05, na.rm = TRUE, verbose = TRUE)
formula |
a formula of the form |
data |
a data frame containing the variables in the 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. |
A list with class "owt" containing the following components:
statistic |
the KTP test statistic. |
mean |
the mean of the KTP test statistic. |
variance |
the variance of the KTP test statistic. |
Z |
the standardized test statistic. |
p.value |
the p-value of the test. |
alpha |
the level of significance. |
method |
the character string "KTP". |
data |
a data frame containing the variables in which NA values (if exist) are removed. |
formula |
a formula of the form |
Bulent Altunkaynak
Jonckheere, A. R. (1954). A Distribution-Free k-Sample Test Against Ordered Alternatives. Biometrika, 41, 133-145.
Terpstra, J., Chang, C.H., Magel, R.C. (2011). On the use of Spearman's correlation coefficient for testing ordered alternatives. Journal of Statistical Computation and Simulation, 81:11, 1381-1392.
library(npordtests) ## Data from Jonckheere (1954) data(jdata) KtpTest(Y~X,jdata)
library(npordtests) ## Data from Jonckheere (1954) data(jdata) KtpTest(Y~X,jdata)
This synthetic data is reported by Lehmann (1975). The data consists of 3 groups with 28, 23 and 21 observations respectively.
lehmann
lehmann
A data frame with 72 observations on the following 2 variables.
Group
Number of samples
Values
Value
Lehmann, E. (1975). Nonparametrics: Statistical Methods based on Ranks, Holden-Day, San Francisco, 1st edition, p.12.
library(npordtests) data(lehmann) levels(lehmann$Group) <- c("Undergraduates", "Trainees", "Staff") boxplot(Values~Group,data=lehmann,xlab="Groups")
library(npordtests) data(lehmann) levels(lehmann$Group) <- c("Undergraduates", "Trainees", "Staff") boxplot(Values~Group,data=lehmann,xlab="Groups")
LsTest
performs LS test.
LsTest(formula, data, alpha = 0.05, na.rm = TRUE, verbose = TRUE)
LsTest(formula, data, alpha = 0.05, na.rm = TRUE, verbose = TRUE)
formula |
a formula of the form |
data |
a data frame containing the variables in the 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. |
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 |
Bulent Altunkaynak
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.
library(npordtests) ## Data from Jonckheere (1954) data(jdata) LsTest(Y~X,jdata) ## Data from Lehmann (1975) data(lehmann) LsTest(Values~Group,lehmann)
library(npordtests) ## Data from Jonckheere (1954) data(jdata) LsTest(Y~X,jdata) ## Data from Lehmann (1975) data(lehmann) LsTest(Values~Group,lehmann)
LtTest
performs LT test.
LtTest(formula, data, alpha = 0.05, na.rm = TRUE, verbose = TRUE)
LtTest(formula, data, alpha = 0.05, na.rm = TRUE, verbose = TRUE)
formula |
a formula of the form |
data |
a data frame containing the variables in the 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. |
A list with class "owt" containing the following components:
statistic |
the LT test statistic. |
mean |
the mean of the LT test statistic. |
variance |
the variance of the LT test statistic. |
Z |
the standardized test statistic. |
p.value |
the p-value of the test. |
alpha |
the level of significance. |
method |
the character string "LT test ". |
data |
a data frame containing the variables in which NA values (if exist) are removed. |
formula |
a formula of the form |
Bulent Altunkaynak
Buning, H.(1996). Adaptive tests for the c-sample location problem - the case of two-sided alternatives. Communications in Statistics-Theory and Methods, 25, 1569-1582.
Beier, F., Buning, H.(1997). An adaptive test against ordered alternatives. Computational Statistics & Data Analysis, 25:4, 441-452.
Jonckheere, A. R. (1954). A Distribution-Free k-Sample Test Against Ordered Alternatives. Biometrika, 41, 133-145.
library(npordtests) ## Data from Jonckheere (1954) data(jdata) LtTest(Y~X,jdata) ## Data from Lehmann (1975) data(lehmann) LtTest(Values~Group,lehmann)
library(npordtests) ## Data from Jonckheere (1954) data(jdata) LtTest(Y~X,jdata) ## Data from Lehmann (1975) data(lehmann) LtTest(Values~Group,lehmann)
MjtTest
performs MJT test.
MjtTest(formula, data, alpha = 0.05, na.rm = TRUE, verbose = TRUE)
MjtTest(formula, data, alpha = 0.05, na.rm = TRUE, verbose = TRUE)
formula |
a formula of the form |
data |
a data frame containing the variables in the 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. |
information.gain
is
.
gain.ratio
is
symmetrical.uncertainty
is
A list with class "owt" containing the following components:
statistic |
the MJT test statistic. |
mean |
the mean of the MJT test statistic. |
variance |
the variance of the MJT test statistic. |
Z |
the standardized test statistic. |
p.value |
the p-value of the test. |
alpha |
the level of significance. |
method |
the character string "MJT test ". |
data |
a data frame containing the variables in which NA values (if exist) are removed. |
formula |
a formula of the form |
Bulent Altunkaynak
Jonckheere, A. R. (1954). A Distribution-Free k-Sample Test Against Ordered Alternatives. Biometrika, 41, 133-145.
Neuhauser, M., Liu, P.Y., Hothorn, L.A.(1998). Nonparametric Tests for Trend: Jonckheere's Test, a Modification and a Maximum Test. Biometrical Journal, 40:8, 899-909.
Tryon, V. P., Hettmansperger, T. P. (1973). A class of nonparametric tests for homogeneity against ordered alternatives. Annals of Statistics, 1, 1061-1070.
library(npordtests) ## Data from Jonckheere (1954) data(jdata) MjtTest(Y~X,jdata) ## Data from Lehmann (1975) data(lehmann) MjtTest(Values~Group,lehmann)
library(npordtests) ## Data from Jonckheere (1954) data(jdata) MjtTest(Y~X,jdata) ## Data from Lehmann (1975) data(lehmann) MjtTest(Values~Group,lehmann)
This synthetic data is reported by Neuhauser et al. (1998). The data consists of 4 groups with 10 observations per group.
neuhauser
neuhauser
A data frame with 72 observations on the following 2 variables.
group
Group number
value
Value
Neuhauser M, Liu PY, Hothorn LA (1998), Nonparametric Tests for Trend: Jonckheere's Test, a Modification and a Maximum Test. Biom J, 40, 899-909.
library(npordtests) data(neuhauser) boxplot(value~group,data=neuhauser,xlab="Groups")
library(npordtests) data(neuhauser) boxplot(value~group,data=neuhauser,xlab="Groups")
RsTest
performs RS test.
RsTest(formula, data, alpha = 0.05, na.rm = TRUE, verbose = TRUE)
RsTest(formula, data, alpha = 0.05, na.rm = TRUE, verbose = TRUE)
formula |
a formula of the form |
data |
a data frame containing the variables in the 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. |
A list with class "owt" containing the following components:
statistic |
the RS test statistic. |
mean |
the mean of the RS test statistic. |
variance |
the variance of the RS test statistic. |
Z |
the standardized test statistic. |
p.value |
the p-value of the test. |
alpha |
the level of significance. |
method |
the character string "RS test ". |
data |
a data frame containing the variables in which NA values (if exist) are removed. |
formula |
a formula of the form |
Bulent Altunkaynak
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.
library(npordtests) ## Data from Jonckheere (1954) data(jdata) RsTest(Y~X,jdata) ## Data from Lehmann (1975) data(lehmann) RsTest(Values~Group,lehmann)
library(npordtests) ## Data from Jonckheere (1954) data(jdata) RsTest(Y~X,jdata) ## Data from Lehmann (1975) data(lehmann) RsTest(Values~Group,lehmann)
SsTest
performs S test.
SsTest(formula, data, alpha = 0.05, na.rm = TRUE, verbose = TRUE)
SsTest(formula, data, alpha = 0.05, na.rm = TRUE, verbose = TRUE)
formula |
a formula of the form |
data |
a data frame containing the variables in the 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. |
A list with class "owt" containing the following components:
statistic |
the S test statistic. |
mean |
the mean of the S test statistic. |
variance |
the variance of the S test statistic. |
Z |
the standardized test statistic. |
p.value |
the p-value of the test. |
alpha |
the level of significance. |
method |
the character string "S test". |
data |
a data frame containing the variables in which NA values (if exist) are removed. |
formula |
a formula of the form |
Bulent Altunkaynak
Jonckheere, A. R. (1954). A Distribution-Free k-Sample Test Against Ordered Alternatives. Biometrika, 41, 133-145.
Shan, G., Young, D., Kang, L.(2014). A New Powerful Nonparametric Rank Test for Ordered Alternative Problem. Plos One, 9:11, 1-10.
library(npordtests) ## Data from Jonckheere (1954) data(jdata) SsTest(Y~X,jdata) ## Data from Lehmann (1975) data(lehmann) SsTest(Values~Group,lehmann)
library(npordtests) ## Data from Jonckheere (1954) data(jdata) SsTest(Y~X,jdata) ## Data from Lehmann (1975) data(lehmann) SsTest(Values~Group,lehmann)
StTest
performs ST test.
StTest(formula, data, alpha = 0.05, na.rm = TRUE, verbose = TRUE)
StTest(formula, data, alpha = 0.05, na.rm = TRUE, verbose = TRUE)
formula |
a formula of the form |
data |
a data frame containing the variables in the 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. |
A list with class "owt" containing the following components:
statistic |
the ST test statistic. |
mean |
the mean of the ST test statistic. |
variance |
the variance of the ST test statistic. |
Z |
the standardized test statistic. |
p.value |
the p-value of the test. |
alpha |
the level of significance. |
method |
the character string "ST test ". |
data |
a data frame containing the variables in which NA values (if exist) are removed. |
formula |
a formula of the form |
Bulent Altunkaynak
Beier, F., Buning, H.(1997). An adaptive test against ordered alternatives. Computational Statistics & Data Analysis, 25:4, 441-452.
Gastwirth, J.L.(1965). Percentile modifications of two sample rank tests. Journal of the American Statistical Association, 60, 1127-1141.
Jonckheere, A. R. (1954). A Distribution-Free k-Sample Test Against Ordered Alternatives. Biometrika, 41, 133-145.
library(npordtests) ## Data from Jonckheere (1954) data(jdata) StTest(Y~X,jdata) ## Data from Lehmann (1975) data(lehmann) StTest(Values~Group,lehmann)
library(npordtests) ## Data from Jonckheere (1954) data(jdata) StTest(Y~X,jdata) ## Data from Lehmann (1975) data(lehmann) StTest(Values~Group,lehmann)
TmTest
performs TM test.
TmTest(formula, data, alpha = 0.05, na.rm = TRUE, verbose = TRUE)
TmTest(formula, data, alpha = 0.05, na.rm = TRUE, verbose = TRUE)
formula |
a formula of the form |
data |
a data frame containing the variables in the 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. |
A list with class "owt" containing the following components:
statistic |
the TM test statistic. |
mean |
the mean of the TM test statistic. |
variance |
the variance of the TM test statistic. |
Z |
the standardized test statistic. |
p.value |
the p-value of the test. |
alpha |
the level of significance. |
method |
the character string "TM test". |
data |
a data frame containing the variables in which NA values (if exist) are removed. |
formula |
a formula of the form |
Bulent Altunkaynak
Jonckheere, A. R. (1954). A Distribution-Free k-Sample Test Against Ordered Alternatives. Biometrika, 41, 133-145.
Terpstra, J., Magel, R.C. (2003). A new nonparametric test for the ordered alternative problem. Journal of Nonparametric Statistics, 15:3, 289-301.
library(npordtests) ## Data from Jonckheere (1954) data(jdata) TmTest(Y~X,jdata) ## Data from Lehmann (1975) data(lehmann) TmTest(Values~Group,lehmann)
library(npordtests) ## Data from Jonckheere (1954) data(jdata) TmTest(Y~X,jdata) ## Data from Lehmann (1975) data(lehmann) TmTest(Values~Group,lehmann)
WsTest
performs WS test.
WsTest(formula, data, alpha = 0.05, na.rm = TRUE, verbose = TRUE)
WsTest(formula, data, alpha = 0.05, na.rm = TRUE, verbose = TRUE)
formula |
a formula of the form |
data |
a data frame containing the variables in the 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. |
A list with class "owt" containing the following components:
statistic |
the WS test statistic. |
mean |
the mean of the WS test statistic. |
variance |
the variance of the WS test statistic. |
Z |
the standardized test statistic. |
p.value |
the p-value of the test. |
alpha |
the level of significance. |
method |
the character string "WS test ". |
data |
a data frame containing the variables in which NA values (if exist) are removed. |
formula |
a formula of the form |
Bulent Altunkaynak
Beier, F., Buning, H.(1997). An adaptive test against ordered alternatives. Computational Statistics & Data Analysis, 25:4, 441-452.
Jonckheere, A. R. (1954). A Distribution-Free k-Sample Test Against Ordered Alternatives. Biometrika, 41, 133-145.
library(npordtests) ## Data from Jonckheere (1954) data(jdata) WsTest(Y~X,jdata) ## Data from Lehmann (1975) data(lehmann) WsTest(Values~Group,lehmann)
library(npordtests) ## Data from Jonckheere (1954) data(jdata) WsTest(Y~X,jdata) ## Data from Lehmann (1975) data(lehmann) WsTest(Values~Group,lehmann)