Note that there are some explanatory texts on larger screens.

plurals
  1. PODeconvolution with R (decon and deamer package)
    text
    copied!<p>I have a model of the form: y = x + noise. I know the distribution of 'y' and of the noise and would like to have the distribution of 'x'. So I tried to deconvolve the distributions with R. I found 2 packages (decon and deamer) and I thought both methods should make more or less the same but I don't understand why deconvoluting with DeconPdf gives me a something like a normal distribution and deconvoluting with deamerKE gives me a uniform distribution. Here is an example code:</p> <pre><code>library(fitdistrplus) # for rweibull library(decon) # for DeconPdf library(deamer) # for deamerKE set.seed(12345) y &lt;- rweibull(10000, shape=5.780094, scale=0.00204918) noise &lt;- rnorm(10000, mean=0.002385342, sd=0.0004784688) sdnoise &lt;- sd(noise) est &lt;- deamerKE(y, noise.type="Gaussian", mean(noise), sigma=sdnoise) plot(est) estDecon &lt;- DeconPdf(y, sdnoise, error="normal", fft=TRUE) plot(estDecon) </code></pre> <hr> <p><strong>Edit</strong> (in response to <a href="https://stackoverflow.com/a/12464936/1635321">Julien Stirnemann</a>):</p> <p>I am not sure about re-parametrizing. My actual problem is: I have reaction time (RT) which theoretically can be described as f(RT) = g(discrimination time) + h(selection time), where f,g and h are can be transformations of those time values. I have "RT" and "discrimination time" values in my dataset. And I am interested in selection time or maybe h(selection time). With kernel density estimation I found out that the weibull distribution fits the 1/RT values best, while normal distribution fits 1/(discrimination time) best. That is why I can write my problem as 1/RT = 1/(discrimination time) + h(selection time) or y = x + noise (where I considered the noise to be 1/(discrimination time)). Simulating those reaction times gave me the following distribution with the following parameters:</p> <pre><code>y &lt;- rweibull(10000, shape=5.780094, scale=0.00204918) noise &lt;- rnorm(10000, mean=0.002385342, sd=0.0004784688) </code></pre> <p>What do you mean with re-parametrizing? Using different values e.g. for the scale parameter? </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload