R/cor.me.matrix.R

"cor.me.matrix" <-
function(exp,se)
  {

    p <- nrow(exp)
    n <- ncol(exp)

    cor.me <- diag(rep(1,p))
    
   for ( i in 1:(p-1))
     for (j in (i+1):p)
       {
  #       cat("i=",i," j=",j,"\n")
         cor.me[i,j] <- cor.me.vector(as.numeric(exp[i,]),as.numeric(se[i,]),as.numeric(exp[j,]),as.numeric(se[j,]))$estimate[2]
         cor.me[j,i] <- cor.me[i,j]
       }
    return(list(corr.true=cor.me))
  }

Try the MeasurementError.cor package in your browser

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

MeasurementError.cor documentation built on Nov. 8, 2020, 5:08 p.m.