train_PFA: Train a Poisson factor analysis model

Description Usage Arguments Value

Description

This function trains a Poisson factor analysis model in Stan.

Usage

1
train_PFA(train, gp_train, nfac = 2, ...)

Arguments

train

data frame. The training data set, consisting of counts. Columns represent variables, rows represent observations.

gp_train

vector. Groups for each observation.

nfac

numeric. The number of factors.

...

Arguments passed to rstan::sampling (e.g. iter, chains).

Value

A list.

train

Training data set.

gp_train

A vector of groups for each observation.

loadings

Aggregated loadings.

scores

Aggregated factor scores.

stan_mod

An object of S4 class stanfit.


gregorp90/RStan-package-test documentation built on May 26, 2019, 1:32 a.m.