R/promat.R

Defines functions promat

Documented in promat

promat <-
function(pc, nage)
{
  #"pc" is a element comtaining the projection matrix components estimated from the
  #function "procomp"
  lcJ <- diag(pc[, 3], nrow = nage, ncol = nage)
  if(nage == 1)
  {
    l <- matrix(rbind(pc[, 2], lcJ), ncol = nage)
  }
  else
  {
    l <- matrix(rbind(pc[, 2], lcJ[-nage, ]), ncol = nage)
    l[nage, nage] <- lcJ[nage, nage]
  }
  #Output
  l
}

Try the lmf package in your browser

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

lmf documentation built on June 24, 2022, 5:06 p.m.