Learn R Programming

attract (version 1.24.0)

calcRss: Function calculates the average RSS for a set of cluster assignments.

Description

Function calculates the average RSS for a set of cluster assignments.

Usage

calcRss(exprs.dat, cl, class.vector)

Arguments

exprs.dat
a matrix of gene expression values.
cl
a vector of cluster assignments.
class.vector
a vector specifying the group membership of the samples.

Value

A numeric value representing the average RSS value for this set of cluster assignments.

Details

This function is called internally by findSynexprs. For an informative cluster, the RSS values should be very small relative to those produced by the informativeness metric (the MSS values).

Examples

Run this code
## Not run: 
# library(cluster)
# data(subset.loring.eset)
# clustObj <- agnes(as.dist(1-t(cor(exprs(subset.loring.eset)))))
# crss.vals <- NULL 
# for( i in 1:10 ){
# 	crss.vals <- c(crss.vals, calcRss(exprs(subset.loring.eset), cutree(clustObj,i), pData(subset.loring.eset)$celltype))
# }
# # The RSS values are expected to be smaller than the informativeness metric values in the presence of genuine cluster structure.
# ## End(Not run)

Run the code above in your browser using DataLab