Displaying 1 result from an estimated 1 matches for "upr1".
Did you mean:
ucr1
2007 May 24
3
Problem with numerical integration and optimization with BFGS
...51 <- ((-y[i]+rho1*y[i-1]-muep)^2)/((-2)*(1-rho2^2)*sigep^2)
b52 <-
(rho2*(-y[i]+rho1*y[i-1]-muep)*(z5))/((1-rho2^2)*sigep*sigeta)
b53 <- ((z5)^2)/((-2)*(1-rho2^2)*(sigeta^2))
return((exp(b51+b52+b53))/denom)
}
for (i in 2:n) { # START FOR LOOP
upr1 <- (y[i]-rho1*y[i-1])
upr2 <- (y[i]-y[i-1]+delta)
# INTEGRATING THE THREE FUNCTIONS
out1 <- integrate(f1, lower = (-1)*upr1, upper = upr1)
out3 <- integrate(f3, lower = -Inf, upper = upr2)
out5 <- integrate(f5, lower= -Inf, upper = upr2)...