R/CVs.R

Defines functions CVs

Documented in CVs

CVs <-
function(X, dummy=FALSE, pos=NULL){
  if (dummy == T){X = as.matrix(X[,-pos])}
  x = as.matrix(X[,-1])
  if (dim(x)[2] >= 1){
    cvs = array( , dim(x)[2])
    for(i in 1:dim(x)[2]){
      cvs[i] = CV(x[,i])	
    }
    salida = cvs
  }
  else {
    salida = "At least one quantitative independent variable are needed (excluding the intercept)"
  }
  return(salida)
}

Try the multiColl package in your browser

Any scripts or data that you put into this service are public.

multiColl documentation built on July 21, 2022, 9:06 a.m.