0

I am using the ksdensity function, which objective is to ive an kernel estimator for a probability density function. This kernel estimator is continous and given by the sum of simple functions. Matlab gives me the value of the kernel at a predetermined set of points. But I need the analytical formula. How can I get this analytical formula?

If, for example, Matlab gives me which "simple function" it is using and the coefficient it attributed to each "simple function", I can do the sum myself and get the analytical formula.

I am asking this because I will need to compute the conditional copula, as sugested in this answer to my original problem. Now I have a Matlab/programming problem.

Pierre
  • 1
  • Did you read the documentation to this function? One of the [Name-Value pair arguments](https://www.mathworks.com/help/stats/ksdensity.html#namevaluepairarguments) is `'Function'`, which allows you to specify the function to use. By default it's a normal distribution. – Cris Luengo Feb 15 '18 at 23:14
  • yes, I did. But did not find the coefficints it is using to get the kernel. – Pierre Feb 16 '18 at 15:12
  • Given it's a normal disribution (Gaussian curve), you only have one coefficient. It can be set with the `'Bandwidth'` option. I don't know how it calculates the default, but since you can choose a value, that shouldn't be an issue. Furthermore, you can choose your own kernel, pass in a function handle. That way you know exactly what the kernel is. – Cris Luengo Feb 16 '18 at 17:41
  • @CrisLuengo this is not the issue. The issue is that it multiplies each kernel function by a constant, I need to know wich constant it is. The more data is in the bandwich, the larger the multiplying constant will be. – Pierre Feb 19 '18 at 11:42
  • If it computes a probability density function, it computes a function whose integral is 1. If you have N input samples, then you add N Gaussians, so each one will be multiplied by 1/N. But all of that is irrelevant: you can compute the arbitrarily scaled function and normalize it. – Cris Luengo Feb 19 '18 at 16:47
  • @CrisLuengo what do you mean with "you can compute the arbitrarily scaled function and normalize it". Remember that I need the analytical formula in order to compute the conditional copula (which requires derivative computation). – Pierre Feb 20 '18 at 13:27

0 Answers0