Tests for General Factorial Designs

Description

The GFD function calculates the Wald-type statistic (WTS), the ANOVA-type statistic (ATS) as well as a permutation version of the WTS for general factorial designs.

Usage

1
GFD(formula, data = NULL, nperm = 10000, alpha = 0.05)

Arguments

formula

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.

data

A data.frame, list or environment containing the variables in formula. The default option is NULL.

nperm

The number of permutations used for calculating the permuted Wald-type statistic. The default option is 10000.

alpha

A number specifying the significance level; the default is 0.05.

Details

The package provides the Wald-type statistic, a permuted version thereof as well as the ANOVA-type statistic for general factorial designs, even with non-normal error terms and/or heteroscedastic variances. It is implemented for both crossed and hierarchically nested designs and allows for an arbitrary number of factor combinations as well as different sample sizes in the crossed design. The GFD function returns three p-values: One for the ATS based on an F-quantile and two for the WTS, one based on the χ^2 distribution and one based on the permutation procedure. Since the ATS is only an approximation and the WTS based on the χ^2 distribution is known to be very liberal for small sample sizes, we recommend to use the WTPS in these situations.

Value

A GFD object containing the following components:

Descriptive

Some descriptive statistics of the data for all factor level combinations. Displayed are the number of individuals per factor level combination, the mean, variance and 100*(1-alpha)% confidence intervals.

WTS

The value of the WTS along with degrees of freedom of the central chi-square distribution and p-value, as well as the p-value of the permutation procedure.

ATS

The value of the ATS, degrees of freedom of the central F distribution and the corresponding p-value.

References

Friedrich, S., Konietschke, F., Pauly, M.(2015). GFD - An R-package for the Analysis of General Factorial Designs. Submitted to Journal of Statistical Software.

Pauly, M., Brunner, E., Konietschke, F.(2015). Asymptotic Permutation Tests in General Factorial Designs. Journal of the Royal Statistical Society - Series B 77, 461-473.

Examples

1
2
3
4
5
GFD(weightgain ~ source * type, data = HSAUR::weightgain)

data(startup)
model <- GFD(Costs ~ company, data = startup)
summary(model)