Print a matrix of pair-wise comparisons based on an 'sma' fit.

A matrix of comparisons is drawn, based on the P values of the pair-wise tests between levels of the grouping variable. An 'X' indicates P < 0.05, 'o' indicates 0.05 < P < 0.1.

multcompmatrix(smfit, sort = TRUE)

Arguments

smfit

An object of class 'sma', fit with sma.

sort

Logical. Specifies whether or not to sort groups from smallest to largest value based on the parameter of interest (slope, elevation or mean fitted value).

Value

Invisibly returns the (character) matrix.

See also

Author

Remko Duursma and Daniel Falster.

Examples



# Print the matrix of comparisons:
data(leaflife)
sm1 <- sma(lma ~ longev + site, data=leaflife, multcomp=TRUE)
multcompmatrix(sm1)
#> Multiple comparison matrix.
#> Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#> 
#>       site_2
#> site_1 1   3   2   4  
#>      1 -   *** *   ***
#>      3 *** -   ***    
#>      2 *   *** -   *  
#>      4 ***     *   -  

# Write the matrix to a file like this:
if (FALSE) {
capture.output(multcompmatrix(sm1), file="sm1matrix.txt")
}