R/dae.nonspecific.R

Defines functions dae.nonspecific

Documented in dae.nonspecific

dae.nonspecific <-
function(zpre,rel,zpost,mmat,componentname,cnames,cnamesie,emat,vmat,icol,iecol,gls)
# dae.nonspecific() - expectations for a nonspecific component
#             zpre,zposr are zi or zm or zc
{

  nszpre <- zpre[["NS"]]
  nszpost <- zpost[["NS"]]
#   zaz <- matrix(0,nrows(emat),nrows(emat)
    zaz <- nszpre %*% rel %*% t(nszpost)
    emat[,icol] <- as.vector(mmat %*% zaz %*% mmat) # one col of W matrix
    if(gls) {
      vmat[,icol] <- as.vector(zaz) # one col of V matrix
    }
    cnames[icol] <- componentname # name for this col
    icol <- icol + 1

   daelist <- list(cnames=cnames,cnamesie=cnamesie,emat=emat,vmat=vmat,icol=icol,iecol=iecol)
   return(daelist)
}

Try the dmm package in your browser

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

dmm documentation built on July 26, 2023, 5:23 p.m.