Learn R Programming

bayesianOU (version 0.1.3)

compute_common_factor: Compute common factor from matrix

Description

Extracts first principal component and standardizes using training period.

Usage

compute_common_factor(Mz, T_train, use_train_loadings = FALSE, verbose = FALSE)

Value

Numeric vector of factor scores (length T)

Arguments

Mz

Standardized matrix (T x S)

T_train

Number of training observations

use_train_loadings

Logical. If TRUE, compute loadings only from training data. Default FALSE.

verbose

Logical. Print progress messages. Default FALSE.