Dear R helpers

I am having recovery rates as given below and I am trying to estimate the Loss Given Default (LGD) and for this I am using Kernel Density estimation method.

recovery_rates = c(0.61,0.12,0.10,0.68,0.87,0.19,0.84,0.81,0.87,0.54,0.08,0.65,0.91,
0.56,0.52,0.30,0.41,0.24,0.66,0.35,0.36,0.64,0.55,0.43,0.36,0.28,0.89,0.11,0.23,0.07,
0.66,0.67,0.48,0.86,0.94,0.86,0.00,0.03,0.95,0.65,0.48,0.79,0.96,0.34,0.68,0.33,0.49,
0.79,0.89,0.04,0.05,0.83,0.88,0.64,0.15,0.67,0.43,0.40,0.37,0.61,0.18,0.24,0.41,0.97,
0.82,0.11,0.53,0.80,0.71,0.31,0.70,0.00,0.90,0.88,0.15,0.49,0.54,0.89,0.07,0.09,0.34,
0.20,0.73,0.37,0.94,0.49,0.40,0.55,0.68,0.89,0.00,0.42,0.94,0.06,0.53,0.46,0.11,0.96,
0.41,0.69)

I need to find out the bandwidth and I have two ways of doing it
 as

# as per the stats package

bw1 = bw.nrd0(recovery_rates)             #    which gives me bw1 = 0.1050780

# as per the KernSmooth package

bw2 = dpik(recovery_rates)                    #    which gives bw2 = 0.1027932

I am bit confused which bandwidth is to be used. Is it that "statistics package" deal with univariate data while KernSmooth deals with multivariate data? Also, whenever I need to read some package, I download the respective "package".zip file, but I couldn't get the zip file pertaining to "statistics" package.

Kindly guide


Regards

Amelia





      
	[[alternative HTML version deleted]]

