R/llP.R

llP <- function(beta, X, event, offset){
  f <- as.numeric(X%*%beta)
  ef <- exp(f)
  return(-sum(offset * ef) + sum(event * log(offset * ef)))  
}

Try the penMSM package in your browser

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

penMSM documentation built on May 2, 2019, 11:06 a.m.