Tidy summarizes information about the components of a model. A model component might be a single term in a regression, a single hypothesis, a cluster, or a class. Exactly what tidy considers to be a model component varies cross models but is usually self-evident. If a model has several distinct types of components, you will need to specify which components to return.

# S3 method for manova
tidy(x, test = "Pillai", ...)

Arguments

x

A manova object return from stats::manova().

test

One of "Pillai" (Pillai's trace), "Wilks" (Wilk's lambda), "Hotelling-Lawley" (Hotelling-Lawley trace) or "Roy" (Roy's greatest root) indicating which test statistic should be used. Defaults to "Pillai".

...

Arguments passed on to stats::summary.manova

object

An object of class "manova" or an aov object with multiple responses.

test

The name of the test statistic to be used. Partial matching is used so the name can be abbreviated.

intercept

logical. If TRUE, the intercept term is included in the table.

tol

tolerance to be used in deciding if the residuals are rank-deficient: see qr.

Details

Depending on which test statistic is specified only one of pillai, wilks, hl or roy is included.

See also

Value

A tibble::tibble() with columns:

den.df

TODO

num.df

Degrees of freedom

p.value

The two-sided p-value associated with the observed statistic.

statistic

The value of a T-statistic to use in a hypothesis that the regression term is non-zero.

term

The name of the regression term.

pillai

Pillai's trace.

wilks

Wilk's lambda.

hl

Hotelling-Lawley trace.

roy

Roy's greatest root.

Examples

npk2 <- within(npk, foo <- rnorm(24)) m <- manova(cbind(yield, foo) ~ block + N * P * K, npk2) tidy(m)
#> # A tibble: 8 x 7 #> term df pillai statistic num.df den.df p.value #> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> #> 1 block 5 1.03 2.56 10 24 0.0287 #> 2 N 1 0.514 5.81 2 11 0.0190 #> 3 P 1 0.0690 0.408 2 11 0.675 #> 4 K 1 0.401 3.68 2 11 0.0598 #> 5 N:P 1 0.164 1.08 2 11 0.373 #> 6 N:K 1 0.213 1.49 2 11 0.268 #> 7 P:K 1 0.00795 0.0441 2 11 0.957 #> 8 Residuals 12 NA NA NA NA NA