# sumstats: Summary statistics on xy co-ordinates, returns the slopes and... In made4: Multivariate analysis of microarray data using ADE4

## Description

Given a `data.frame` or `matrix` containing xy coordinates, it returns the slope and distance from origin of each coordinate.

## Usage

 `1` ```sumstats(array, xax = 1, yax = 2) ```

## Arguments

 `array` A `data.frame` or `matrix` containing xy coordinates, normally a \\$co, \\$li from `dudi` such as PCA or COA, or \\$ls from `bga` `xax` Numeric, an integer indicating the column of the x axis coordinates. Default xax=1 `yax` Numeric, an integer indicating the column of the x axis coordinates. Default xax=2

## Details

In PCA or COA, the variables (upregulated genes) that are most associated with a case (microarray sample), are those that are projected in the same direction from the origin.

Variables or cases that have a greater contribution to the variance in the data are projected further from the origin in PCA. Equally variables and cases with the strong association have a high chi-square value, and are projected with greater distance from the origin in COA, See a description from Culhane et al., 2002 for more details.

Although the projection of co-ordinates are best visualised on an xy plot, `sumstats` returns the slope and distance from origin of each x,y coordinate in a matrix.

## Value

A matrix (ncol=3) containing

 ```1 2 3``` ``` slope angle (in degrees) distance from origin ```

of each x,y coordinates in a matrix.

Aedin Culhane

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21``` ```data(khan) if (require(ade4, quiet = TRUE)) { khan.bga<-bga(khan\$train, khan\$train.classes)} plotarrays(khan.bga\$bet\$ls, classvec=khan\$train.classes) st.out<-sumstats(khan.bga\$bet\$ls) # Get stats on classes EWS and BL EWS<-khan\$train.classes==levels(khan\$train.classes) st.out[EWS,] BL<-khan\$train.classes==levels(khan\$train.classes) st.out[BL,] # Add dashed line to plot to highlight min and max slopes of class BL slope.BL.min<-min(st.out[BL,1]) slope.BL.max<-max(st.out[BL,1]) abline(c(0,slope.BL.min), col="red", lty=5) abline(c(0,slope.BL.max), col="red", lty=5) ```

made4 documentation built on Nov. 8, 2020, 6:49 p.m.