Revision 69d148ddb24d5cb53bce843f0f63e388b903fcbd authored by Bendix Carstensen on 22 May 2010, 05:22:26 UTC, committed by cran-robot on 22 May 2010, 05:22:26 UTC
1 parent 1c180cf
Raw File
contr.orth.R
contr.orth <-
  function( n )
  {
  if( is.numeric( n ) && length( n )==1 )
  levs <- 1:n
  else {
  levs <- n
  n <- length( n )
  }
  Z <- contr.sum( n )
  L <- 1:n - mean(1:n)
  contr <- Z - L%*%( ( t(L) %*% L )^(-1) ) %*% ( t(L) %*% Z )
  contr[,1:(n-2)]
  }
back to top