I really dint know where this question should have been posted! Is it possible to evaluate an integral in R when one of the limits is a variable? The integration with constant limits works! If R wont do this, would you suggest a software package that would??
Do you mean like below? If so, MATLAB can do it. >> syms x y >> f = y^3 - y^2 + 1 f = y^3 - y^2 + 1 >> int(f,y,1,x) ans = x*(x^2*(x/4 - 1/3) + 1) - 11/12
Yes. infact, the expression is complicated It is a joint distribution function so, but the limits are from -infinity to x.
library(cubature) k = 0.618079 rho = 0.402193 k1 = (1+s^2/4)^2.5 k2 = 4*(1-rho)^0.5 f1 = function(r,s) { (k*k1*(1+(r^2)/4)^2.5*(1+(s^2-2*rho*s*r+r^2)/k2)^-2.5 } ##I need to integrate the above twice from (-inf , qt(0.75,4)) wrt s and (-inf , qt(v,4)) wrt r. Finally i require an expression in v, which i then need to integrate from (0,1). I'd be glad of any help!
These, I think, are your problem. I think you want to define k1, k2 as functions of s, as at the moment k1, k2 will just become vectors containing whatever values of s are currently in memory.
qt is the quantile function in r. i just used k1 and k2 for convenience, i've tried it with the constants plugged in, in the equation, and was still unable to do it.