m.step.2normal: M-step for parameterized bivariate 2-component Gaussian...

View source: R/all.R View source: R/m.step.2normal.R

m.step.2normalR Documentation

M-step for parameterized bivariate 2-component Gaussian mixture models

Description

Maximization step in the EM algorithm for parameterized bivariate 2-component Gaussian mixture models with $(1-p)N(0, 0, 1, 1, 0) + pN(mu, mu, sigma^2, sigma^2, rho)$.

Usage

m.step.2normal(z.1, z.2, e.z)

Arguments

z.1

a numerical data vector on coordinate 1.

z.2

a numerical data vector on coordinate 2.

e.z

a vector of expected conditional probability that the $i$th observation is reproducible.

Details

This function is used in the EM algorithm for estimating the parameters of the Gaussian mixture model at the latent copula space.

Value

Estimated parameters, basically a list including elements

p

the estimated mixing proportion of the reproducible component.

mu

the estimated mean for the reproducible component.

sigma

the estimated standard deviation of the reproducible component.

rho

the estimated correlation coefficient of the reproducible component.

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

e.step.2normal, loglik.2binormal, est.IDR

Examples

##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

 
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)))
e.z <- c(rep(0, 500) + abs(rnorm(0, 0.05)), rep(1, 500)-abs(rnorm(0, 0.05)))

para <- m.step.2normal(z.1, z.2, e.z) 

para

idr documentation built on June 21, 2022, 9:05 a.m.