R/bval.R

Defines functions bval

Documented in bval

bval <-
function(D,x,d,V){
   inV <- ginv(V)
   N <- NROW(d)
   r <- NCOL(d)
   D1 <- D-1
   a <- x[1]
   R <- r*D1
   
   beta <- matrix(x[2:(1+R)], ncol=D1,byrow=TRUE) 
   scale <- exp((d%*%beta)%*%inV)
   scale <- scale/rowSums(scale)
   return(scale)
   }

Try the SGB package in your browser

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

SGB documentation built on March 26, 2020, 8:02 p.m.