R/asypow.theta.ho.R

Defines functions asypow.theta.ho

Documented in asypow.theta.ho

asypow.theta.ho <- function(lam.ho, constraints) {

      p <- length(lam.ho) + length(constraints[,1])
      theta.ho <- rep(NA,p)

      ix.con <- constraints[,2]
      theta.ho[-ix.con] <- lam.ho

      if(any(constraints[,1]==1)) {
           ix.set <- constraints[constraints[,1]==1,2]
           theta.ho[ix.set] <- constraints[constraints[,1]==1,3]
      }

      if(any(constraints[,1]==2)) {
           ix.equ <- constraints[constraints[,1]==2,2]
           for(i in rev(ix.equ)) {
                theta.ho[i] <- theta.ho[constraints[i,3]]
           }
      }

      return(theta.ho)
}

Try the asypow package in your browser

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

asypow documentation built on May 2, 2019, 2:37 a.m.