Hello;
I have a function with 3 variables. I would like to take integration with
respect to just one variable. How can I write this function? You can find my
function above. (
I am trying to find \int_ZL^ZU
rho.bisquare(rho*z+u*sqrt(1-rho^2)*dnorm(u)du.Integrand has three variables, I
know the value of k and alpha, I am trying to obtain term2 function with
variable z.
I want to take integral with respect to u. )
rho.bisquare <- function(x,k = k){
i1 <- abs(x)<=k
i2 <- i1==F
out <- (x^2/2)*(1-x^2/k^2 + x^4/(3*k^4))*i1 + k^2/6*i2
out
}
term2<-function(z,k=k,alpha=alpha,rho){
integrand <-function(u){
A <-rho*z+u*sqrt(1-rho^2)
out<-rho.bisquare(A/sqrt(3/2),k = k)*dnorm(u)
out}
ZU <-(sqrt(3/2)*k-rho*z)/sqrt(1-rho^2)
ZL <-(-sqrt(3/2)*k-rho*z)/sqrt(1-rho^2)
out <-integrate(integrand,lower=ZL,upper=ZU)$value
out}
Thank you in advance;
Derya
[[alternative HTML version deleted]]