search for: dgcpois

Displaying 1 result from an estimated 1 matches for "dgcpois".

Did you mean: depois
2009 Jan 05
1
transform R to C
Dear R users, i would like to transform the following function from R-code to C-code and call it from R in order to speed up the computation because in my other functions this function is called many times. `dgcpois` <- function(z, lambda1, lambda2) { `f1` <- function(alpha, lambda1, lambda2) return(exp(log(lambda1) * (alpha - 1) - lambda2 * lgamma(alpha))) `f2` <- function(lambda1, lambda2) return(integrate(f1, lower=1, upper=Inf, lambda1=lambda1, lambda2=lambda2)$value) return(...