Description Usage Arguments Details Value Author(s) References See Also Examples
Computes the convolution product of a normal and a gamma densities.
1 2 3 4 |
par |
vector of parameters; |
x |
vector of values where the density is computed; if |
N0 |
number of equally spaced values in the Fast Fourier Transform (see details). |
plot |
logical; if |
log |
logical; if |
tail.cor |
logical; if |
cor |
limit of right tail correction; if |
mu, sigma |
alternative definition of mean and standard deviation of the normal distribution. |
k, theta |
alternative definition of shape and scale parameters of the gamma distribution. |
The convoluted density is computed using the fft
function (Fast Fourier Transform). See details in Plancade S., Rozenholc Y. and Lund E., BMC Bioinfo 2012.
Only one definition of the parameters is required, either par
or (mu, sigma, k, theta)
. If both are specified and do not match, an error message is returned.
xout |
vector of values where normal-gamma density is computed; equal to |
dout |
vector of values of normal-gamma density. |
Plancade S. and Rozenholc Y.
Plancade S., Rozenholc Y. and Lund E. "Generalization of the normal-exponential model : exploration of a more accurate parametrisation for the signal distribution on Illumina BeadArrays", BMC Bioinfo 2012, 13(329).
normgam.fit
computes the Maximum Likelihood Estimator and normgam.signal
implements the background correction using the normal-gamma model.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## Example 1
par = c(-10, 5, 2, 20)
F = dnormgam(par)
## Example 2
n = 50000
par = c(60,5,0.15,400)
F = dnormgam(par, plot=FALSE)
X = rnorm(n, mean=par[1], sd=par[2]) + rgamma(n, shape=par[3], scale=par[4])
H = histogram(X, type='irregular', verbose=FALSE, plot=FALSE)
plot(H, xlim=c(0,500))
lines(F$xout, F$dout, col='red')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.