Hi all,

   I have some problem regarding the integration function. Can any one
take a look at the following and give me some help? Thank you in advance!
              Hannah

## f0 is a function of r,x, and y

f0 <- function(r, x, y){
        pnorm((x-sqrt(r)*y)/sqrt(1-r), mean=0,sd=1, lower.tail=T)^2*dnorm(y)
}


## f1 is the function of r and x after integrating out y

f1 <- function(r,x) {integrate(f1(r,x,y), -Inf, Inf)}


I got the follow error message :

> f1(0,0)
Error: evaluation nested too deeply: infinite recursion /
options(expressions=)?

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to