Constructing subject-specific objects required for Gibbs sampler (for subjects with incomplete observations only).
Constructing subject-specific objects required for Gibbs sampler (for subjects with incomplete observations only).
subject_specific_objects(k, q, a_full, a_avail, cor_all)
Arguments
k: A numeric scalar. Number of latent factors.
q: A numeric scalar. Number of time points in the complete factor covariance matrix.
a_full: A q-dimensional numeric vector. Complete time sorted from early to late.
a_avail: A vector of time when gene expressions are available, sorted from early to late.
cor_all: A matrix of dimension (kq, kq). Correlation matrix of latent factor scores.
Returns
Subject-specific objects needed for Gibbs sampler.
Details
This function is used to extract subject-specific factor covariance matrix from the complete factor covariance matrix, through constructing subject-specific indicator matrix, which indicates time indexes when gene expression are available.
Examples
# See examples in vignettevignette("bsfadgp_regular_data_example", package ="DGP4LCF")vignette("bsfadgp_irregular_data_example", package ="DGP4LCF")