R/regzip.R

Defines functions regzip

Documented in regzip

regzip <- function(pa, y1, x, n1, poia) {
  a <- exp(pa[1]) / ( 1 + exp(pa[1]) )    ;    b <- pa[-1]
  es <- tcrossprod(b, x)
  - sum( log( a + (1 - a) * exp( - exp( es[poia]) ) ) ) - n1 * log( 1 - a ) - sum( y1 * es[ -poia ] - exp(es[ -poia ]) ) 
}  

Try the MXM package in your browser

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

MXM documentation built on Aug. 25, 2022, 9:05 a.m.