. wrote:
>
> Hello guys,
>
> I would like to ask for help to understand what is going on in
> "func2". My plan is to generalize "func1", so that are expected same
> results in "func2" as in "func1". Executing "func1" returns...
>
> 0.25 with absolute error < 8.4e-05
>
> But for "func2" I get..
Try this:
funa <- function(n, y, a, rate, samp) {
lambda <- a * n
dexp(n, rate) * do.call(paste("d", samp, sep=""), y, lambda)
}
funb <- function(y, a, rate, samp) {
integrate(f1, 0, Inf, y, a, rate)
}
funb(1, 0.1, 0.1, "pois")
Jean
>
> Hello guy
Hello guys,
I would like to ask for help to understand what is going on in
"func2". My plan is to generalize "func1", so that are expected same
results in "func2" as in "func1". Executing "func1" returns...
0.25 with absolute error < 8.4e-05
But for "func2" I get...
Error in dpois(1, 0.1, 23.30
3 matches
Mail list logo