ZIPFA {ZIPFA}R Documentation

Zero Inflated Poisson factor analysis

Description

To conduct a Zero Inflated Poisson factor analysis.

Usage

ZIPFA(X, k, tau = 0.1, cut = 0.8, tolLnlikelihood = 5e-4,
        iter = 20, tol = 1e-4, maxiter = 100, initialtau = 'iteration',
        Madj = TRUE, display = TRUE, missing = NULL)

Arguments

X

The matrix to be decomposed.

k

The number of factors.

tau

Initial tau value to fit. Will be overwritten by the first value in initial argument.

cut

To delete columns that has more than 100('Cut')% zeros. Cut = 1, if no filtering.

tolLnlikelihood

The max percentage of log likelihood differences in two iterations.

iter

Max iterations.

initialtau

A character specifying the way to choose the initial value of tau at the beginning of EM iteration. stable: estimate tau from fitted beta in last round; initial: always use the initially assigned tau in tau or initial. Use the default tau = 0.1 if 'initial' is empty. iteration: use fitted tau in last round.

tol

Percentage of l2 norm change of [tau beta].

maxiter

Max iteration number in the zero inflated poisson regression.

Madj

If TRUE then adjust for relative library size M.

display

If TRUE display the fitting procedure.

missing

Reserved for cv_ZIPFA.

Details

The function conducts a zero-inflated Poisson factor analysis where the underlying Poisson rate is negatively associated with true zero probability.

Value

tau

Fitted tau value.

Ufit

A list containing fitted U matrix in each iteration. The last one is the final fit.

Vfit

A list containing fitted V matrix in each iteration. The last one is the final fit.

itr

Number of iterations.

Likelihood

The likelihood for the training data.

CVLikelihood

The likelihood for the testing data (if applicable)

Author(s)

Tianchen Xu

Examples



data(X)
ZIPFA(X, k = 3)


[Package ZIPFA version 0.8.1 Index]