Displaying 1 result from an estimated 1 matches for "lossdensity".
2005 Dec 10
2
Problems with integrate
Hi,
Having a weird problem with the integrate function.
I have a function which calculates a loss density: I'd like to integrate
it to get the distribution.
The loss density function is:
lossdensity<-function(p,Beta,R=0.4){
# the second derivative of the PDF
# p is the default probability of the pool at which we are evaluating
the lossdensity
# Beta is the correlation with the market factor as a function of K
# R is the recovery rate
K=p
C=qnorm(p) # default threshold for the pool
A=1/Beta...