loglik.2binormal {idr} | R Documentation |
Compute log-likelihood of parameterized bivariate 2-component Gaussian mixture models
Description
Compute the log-likelihood for parameterized bivariate 2-component Gaussian mixture models with (1-p)N(0, 0, 1, 1, 0) + pN(mu, mu, sigma, sigma, rho).
Usage
loglik.2binormal(z.1, z.2, mu, sigma, rho, p)
Arguments
z.1 |
a numerical data vector on coordinate 1. |
z.2 |
a numerical data vector on coordinate 1. |
mu |
mean for the reproducible component. |
sigma |
standard deviation of the reproducible component. |
rho |
correlation coefficient of the reproducible component. |
p |
mixing proportion of the reproducible component. |
Value
Log-likelihood of the bivariate 2-component Gaussian mixture models (1-p)N(0, 0, 1, 1, 0) + N(mu, mu, sigma, sigma, rho)$.
Author(s)
Qunhua Li
References
Q. Li, J. B. Brown, H. Huang and P. J. Bickel. (2011) Measuring reproducibility of high-throughput experiments. Annals of Applied Statistics, Vol. 5, No. 3, 1752-1779.
See Also
m.step.2normal
, e.step.normal
, est.IDR
Examples
z.1 <- c(rnorm(500, 0, 1), rnorm(500, 3, 1))
rho <- 0.8
## The component with higher values is correlated with correlation coefficient=0.8
z.2 <- c(rnorm(500, 0, 1), rnorm(500, 3 + 0.8*(z.1[501:1000]-3), (1-rho^2)))
## Starting values
mu <- 3
sigma <- 1
rho <- 0.85
p <- 0.55
## The function is currently defined as
loglik <- loglik.2binormal(z.1, z.2, mu, sigma, rho, p)
loglik