est.IDR.discrete: EM algorithm to estimate the copula mixture model for...

Description Usage Arguments Details Value Examples

Description

EM algorithm to estimate the copula mixture model for discrete data

Usage

1
2
est.IDR.discrete(x, y, mu, sigma, rho, p, eps, n.missing, miss.sym,
  as.single.loglik, as.single.em, common.only = TRUE, labels = NULL)

Arguments

x

replicate 1 : a vector of values from original observation

y

replicate 2 : paired with x, a repeated measure having same length as x.

mu

a starting value for the mean of the reproducible component.

sigma

a starting value for the standard deviation of the reproducible component.

rho

a starting value for the correlation coefficient of the reproducible component.

p

a starting value for the proportion of reproducible component.

eps

a small number to control convergence. For example, esp=0.0001.

n.missing

n.missing=0 indicates that we run the program as if there is no missing values; n.missing=positive number: the program estimates missing values.

miss.sym

symbol for missing value. For example, miss.sym=0.

as.single.loglik

an integer n to control the precision of numberical integration. If n=1, the computation is exact. If n>1, only integrate the bins with counts more than n, and treat bins with counts <= n as singletons in the likelihood computation

as.single.em

similar to as.single.loglik, except that it does the approximation in EM

common.only

If TRUE, the computation will only use the nonmissing entries. In this case, n.missing should be set to 0. If FALSE, it will use all the entries.

labels

the cdf on the left side of the lower boundary of the bins

Details

EM to compute the latent structure steps: 1. raw values are first transformed into pseudovalues 2. EM is used to compute the underlining structure, which is a mixture of two normals

Value

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
#load chip_seq data
data(chip_seq)
x = chip_seq[,1]
y = chip_seq[,2]

# Initiation
mu <- 2.6
sigma <- 1.3
rho <- 0.8
p <- 0.7
eps <- 0.001
n.missing <- 0

# Estimate parameters of mixture model
gidr.out <- est.IDR.discrete(x, y, mu, sigma, rho, p, eps, n.missing,
                            miss.sym = 0, as.single.loglik = 1,
                            as.single.em = 1, common.only=TRUE, labels=NULL)

names(gidr.out)

qunhualilab/gIDR documentation built on May 14, 2019, 10:38 a.m.