Model initialization for Bayesian PCA. This function is NOT
inteded to be run separately!
Usage
BPCA_initmodel(y, components)
Arguments
y
numeric matrix containing missing values. Missing values
are denoted as 'NA'
components
Number of components used for estimation
Value
List containing
rows
Row number of input matrix
cols
Column number of input matrix
comps
Number of components to use
yest
(working variable) current estimate of complete data
row_miss
(Array) Indizes of rows containing missing values
row_nomiss
(Array) Indices of complete rows (such with no
missing values)
nans
Matrix of same size as input data. TRUE if input == NA,
false otherwise
mean
Column wise data mean
PA
(d x k) Estimated principal axes (eigenvectors,
loadings) The matrix ROWS are the vectors
tau
Estimated precision of the residual error
scores
Estimated scores
Further elements are: galpha0, balpha0, alpha, gmu0, btau0, gtau0,
SigW. These are working variables or constants.
Details
The function calculates the initial Eigenvectors by use of SVD
from the complete rows. The data structure M is created and
initial values are assigned.