MestTwoWay {twowaytests} | R Documentation |
Two-Way ANOVA for M-estimators
Description
MestTwoWay
computes a two-way ANOVA for M-estimators.
Usage
MestTwoWay(formula, data, estimator = c("mom_est", "onestep_est", "median",
"bisquare", "hampel"), nboot = 500, distance = c("mahalanobis", "projected"),
seed = 123, alpha = 0.05, na.rm = TRUE, verbose = TRUE)
Arguments
formula |
a formula of the form |
data |
a data frame containing the variables in |
estimator |
a character string to select one of the estimators. "mom_est": the modified one-step estimator of location based on Huber's Psi, "onestep_est": one-step estimator of location using Huber's Psi, "median": median, "bisquare": Tukey's biweight (bisquare) estimator, "hampel": Hampel's estimator. |
nboot |
the number of bootstrap samples. |
distance |
the specified distance. Default is set to "mahalanobis". |
seed |
a seed number for the reproducibility of results. Default is set to 123. |
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 containing the following components:
output |
a data frame of output. |
alpha |
the level of significance to assess the statistical difference. |
method |
the method name. |
data |
a data frame containing the variables in which NA values (if exist) are removed. |
formula |
a formula of the form |
Author(s)
Muhammed Ali Yilmaz, Osman Dag
References
Wilcox, R.R. (2011). Introduction to robust estimation and hypothesis testing. Academic press.
See Also
Examples
library(twowaytests)
data(alveolar)
MestTwoWay(cell ~ ovalbumin*treatment, data = alveolar)
out <- MestTwoWay(cell ~ ovalbumin*treatment, data = alveolar, verbose = FALSE)
paircompTwoWay(out)
out <- MestTwoWay(cell ~ treatment*ovalbumin, data = alveolar, verbose = FALSE)
paircompTwoWay(out)