init1.1.jk.j {poisson.glm.mix}R Documentation

1st step of Initialization 1 for the βjk\beta_{jk} (m=1m=1) or βj\beta_{j} (m=2m=2) parameterization.

Description

This function is the first step of the two-step small initialization procedure (Initialization 1), used for the parameterizations m=1m=1 (βjk\beta_{jk}) or m=2m=2 (βj\beta_{j}). For each condition j=1,,Jj=1,\ldots,J, a small EM is run in order to find some good starting values for the KK-component mixtures: k=1Kpj=1Ljf(yij)\sum_{k=1}^{K}p_j\prod_{\ell=1}^{L_j}f(y_{ij\ell}), independently for each j=1,,Jj=1,\ldots,J. These values are used in order to initialize the second step (init1.2.jk.j) of the small EM algorithm for fitting the overall mixture k=1Kπjj=1J=1Ljf(yij)\sum_{k=1}^{K}\pi_j\prod_{j=1}^{J}\prod_{\ell=1}^{L_j}f(y_{ij\ell}).

Usage

init1.1.jk.j(reference, response, L, K, t1, model, m1,mnr)

Arguments

reference

a numeric array of dimension n×Vn\times V containing the VV covariates for each of the nn observations.

response

a numeric array of count data with dimension n×dn\times d containing the dd response variables for each of the nn observations.

L

numeric vector of positive integers containing the partition of the dd response variables into JdJ\leq d blocks, with j=1JLj=d\sum_{j=1}^{J}L_j=d.

K

positive integer denoting the number of mixture components.

t1

positive integer denoting the number of different runs.

model

binary variable denoting the parameterization of the model: 1 for βjk\beta_{jk} and 2 for βj\beta_{j} parameterization.

m1

positive integer denoting the number of iterations for each run.

mnr

positive integer denoting the maximum number of Newton-Raphson iterations.

Value

alpha

numeric array of dimension J×KJ \times K containing the selected values αjk(0)\alpha_{jk}^{(0)}, j=1,,Jj=1,\ldots,J, k=1,,Kk=1,\ldots,K that will be used to initialize the second step of the small EM.

beta

numeric array of dimension J×K×TJ \times K \times T (if model = 1) or J×TJ \times T (if model = 2) containing the selected values of βjkτ(t)\beta_{jk\tau}^{(t)} (or βjτ(t)\beta_{j\tau}^{(t)}), j=1,,Jj=1,\ldots,J, k=1,,Kk=1,\ldots,K, τ=1,,T\tau=1,\ldots,T, that will be used to initialize the second step of the small EM.

psim

numeric vector of length KK.

ll

numeric, the value of the loglikelihood, computed according to the mylogLikePoisMix function.

Author(s)

Panagiotis Papastamoulis

See Also

init1.2.jk.j, bjkmodel, bjmodel

Examples

############################################################
#1.            Example with beta_jk (m=1) model            #
############################################################
## load a simulated dataset according to the b_jk model
## number of observations: 500
## design: L=(3,2,1)
data("simulated_data_15_components_bjk")
x <- sim.data[,1]
x <- array(x,dim=c(length(x),1))
y <- sim.data[,-1]
## initialize the component specific parameters 
##                   for a 2 component mixture
start1 <- init1.1.jk.j(reference=x, response=y, L=c(3,2,1), 
                       K=2, t1=3, model=1, m1=5,mnr = 5)
summary(start1)

############################################################
#2.            Example with beta_j (m=2) model             #
############################################################

start1 <- init1.1.jk.j(reference=x, response=y, L=c(3,2,1), 
                       K=2, t1=3, model=2, m1=5,mnr = 5)
summary(start1)


[Package poisson.glm.mix version 1.4 Index]