Learn R Programming

smsets (version 2.0.0)

print.VanValen: Prints van Valen's test

Description

Displays the results of van Valen's test produced by the VanValen function and, optionally, the matrices involved in the calculations.

Usage

# S3 method for VanValen
print(x, long = FALSE, ...)

Value

Displays the results of van Valen's test produced by the VanValen

function. The argument x, invisibly, as for all print methods, is a list of class "VanValen". This print method provides two sorts of output depending on whether the long argument is TRUE or FALSE (the default). The "short" output displays:

  • A two-line heading describing the analysis.

  • The data frame analyzed.

  • The variables used for the comparison of samples.

  • The labels of the two-level group factor (samples), with an order determined by the user in the argument level1 of VanValen.

  • The value of the t-statistic, the degrees of freedom and the p-value.

  • The type of alternative hypothesis for the t-test.

In addition to the above information, the "long" output lists:

  • Sub-data frames containing the standardized data, separately for each sample.

  • The sample medians for the standardized data, samples 1 and 2.

  • Sub-data frames containing the deviations from sample medians for the standardized values, separately for each sample.

  • Sub-data frames containing the pooled distances (d's), separately for each sample. These two samples of d-values are compared by a t-test.

  • The means and variances for each sample of d-values.

Arguments

x

an object of class VanValen.

long

a logical variable indicating whether a long output is desired (TRUE) or not (FALSE, the default)

...

further arguments passed to or from other methods.

Examples

Run this code
data(sparrows)
res.VanValen <- VanValen(sparrows, "Survivorship", "S",
                         alternative = "less", var.equal = TRUE)
# Long output
print(res.VanValen, long = TRUE)

Run the code above in your browser using DataLab