search for: plcdf2

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

Did you mean: pbkdf2
2010 Aug 12
1
Need help to understand integrate function
...the integrate function. I have the following setting: powerLaw2 <- function(x,l1,l2,c0,t0) { idx <- which(x <= 0); if (length(idx) > 0) { x[idx] <- 0; } xl <- (-l1+l2)*log(x/t0); L <- log(c0)-l1*log(x)-log(1+exp(xl)); L <- exp(L); return(L); } plCDF2 <- function(x,l1,l2,c0,t0) { print(c(l1,l2,c0,t0)); cdf <- integrate(f=powerLaw2,lower=x,upper=Inf,l1=l1,l2=l2,c0=c0,t0=t0,stop.on.error=T); return(cdf$value); } I know that as long as my l1 > 1 and l2 < 1 the integration above should converge. However, this doesn't seem...