|
From: | Fredrik Lingvall |
Subject: | Re: pdf estimation |
Date: | Tue, 04 Oct 2011 10:13:03 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:6.0.2) Gecko/20110928 Thunderbird/6.0.2 |
On 10/03/11 19:36, HALL, BENJAMIN PW wrote:
-----Original Message----- From: address@hidden [mailto:address@hidden] On Behalf Of >CdeMills Sent: Monday, October 03, 2011 1:02 PM To: address@hidden Subject: pdf estimation Hello, let's define x as x=randn(200,1); An approximation of x cdf can be obtained as plot(sort(x), (0:199)/200); I tried to estimate the pdf as: pp=spline(sort(x), (0:199)/200); ppd=ppder(pp); x_pdf = ppval(ppd, sort(x)) but the obtained values just exhibit large spikes and nothing usefull can be extracted. The reason for this is that you are trying to estimate N parameters from N data points (where N = 200 in your case) causing a large variance of your estimates. A Gaussian is in your case determined by only two parameters: the mean and the variance. You will obtain a much better result if you estimate the mean and variance instead. Can you describe your problem in more detail? If we know more about the physical process then it's much easier to suggest a good estimator. HTH /Fredrik Is there some way, starting from a random variable, to obtain a smooth estimator of its cdf which can lead to an estimator of its pdf ? Regards PascalThe attached might be useful. This is a quick translation of the R function with the options I was interested in at the time. I'm struggling now to find an appropriate reference on the R web site (www.r-project.org) to point you to for more information. I also don't know if there is some pseudo matlab equivalent, but I find this function to be handy. |
[Prev in Thread] | Current Thread | [Next in Thread] |