The package provides the Wald-type as well as the ANOVA-type statistic for rank-based factorial designs, i.e., even for ordinal data. It is implemented for crossed designs and allows for an arbitrary number of factor combinations as well as different sample sizes.
rankFD(formula, data, alpha = 0.05, CI.method = c("Logit", "Normal"),
effect = c("unweighted", "weighted"), hypothesis = c("H0F", "H0p"),
Factor.Information = FALSE)A model formula object. The left hand side
contains the response variable and the right hand side contains the factor
variables of interest. An interaction term must be specified.
A data.frame, list or environment containing the variables in
formula. The default option is NULL.
A number specifying the significance level; the default is 0.05.
Either "Logit" or "Normal", specifying the method used for calculation of the confidence intervals.
Should the weighted or unweighted effects be calculated?
The null hypothesis to test, either "H0F" or "H0p".
Logical. If TRUE, descriptive statistics for the different factor level combinations is printed.
An rankFD object containing the following components:
Some descriptive statistics of the data for all factor level combinations. Displayed are the number of individuals per factor level combination (size), the relative effect (pd), variance and 100*(1-alpha)% confidence intervals.
The value of the WTS along with degrees of freedom of the central chi-square distribution and p-value
The value of the ATS, degrees of freedom of the central F distribution and the corresponding p-value.
The rankFD() function calculates the Wald-type statistic (WTS) and the ANOVA-type statistic (ATS) for general factorial designs for testing the null hypotheses \(H_0^F: CF = 0\) (cf. Akritas et al. (1997) for the WTS and Brunner et al. (1997) for the ATS) based on weighted effect measures, and \(H_0^p: Cp = 0\) for the vector of unweighted treatment effects as described in Brunner et al. (2016). In the latter paper, the CIs for the unweighted effects (\(p_i\) in their notation) are described and CIs for the weighted effects (\(r_i\) in their notation) are obtained similarly.
Brunner, E., Bathke, A. and Konietschke, F. Rank and Pseudo-Rank Procedures for Independent Observations in Factorial Designs. Springer International Publishing, 2018.
Brunner, E., Konietschke, F., Pauly, M., & Puri, M. L. (2017). Rank-based procedures in factorial designs: Hypotheses about non-parametric treatment effects. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 79(5), 1463-1485.
Akritas, M. G., Arnold, S. F., and Brunner, E. (1997). Nonparametric hypotheses and rank statistics for unbalanced factorial designs. Journal of the American Statistical Association 92, 258-265.
Brunner, E., Dette, H., and Munk, A. (1997). Box-Type Approximations in Nonparametric Factorial Designs. Journal of the American Statistical Association 92, 1494-1502.
# NOT RUN {
data(Coal)
model <- rankFD(Acidity ~ NaOH * Type, data = Coal, CI.method = "Normal",
effect = "unweighted", hypothesis = "H0F")
data(Muco)
model.oneway <- rankFD(HalfTime ~ Disease, data = Muco, CI.method = "Logit",
effect = "weighted", hypothesis = "H0p")
plot(model.oneway)
# }
Run the code above in your browser using DataLab