#' RMSSTD_FUNC function
#'
#' This is one of a few functions created by Joe Cauteruccio, Jessie Li, Andrew West of Yale University that are used together to create the hclust_eval() function.
#'
#'@keywords RMSSTD_FUNC
#'@export
#'
RMSSTD_FUNC <- function(mod_dat, row_v, dim_obs){
RMSSTD_vec <- rep(NA, dim_obs)
RMSSTD_vec[dim_obs] <- 0
for (i in (dim_obs - 1):1) {
x_bar_k <- apply(mod_dat[row_v[[i]], ], 2, mean)
w_k <- sum(apply(mod_dat[row_v[[i]], ], 1, function(x) (dist(rbind(x, x_bar_k))^2)))
RMSSTD_vec[i] <- sqrt(w_k/(dim(mod_dat)[2]*(length(row_v[[i]]) - 1)))
}
return(RMSSTD_vec)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.