cv_plmmPLMM prep: a function to run checks, SVD, and rotation prior to fitting a PLMM model
This is an internal function for cv_plmm
plmm_prep(
std_X,
std_X_n,
std_X_p,
n,
p,
centered_y,
K = NULL,
diag_K = NULL,
eta_star = NULL,
fbm_flag,
trace = NULL,
...
)List with these components:
centered_y: The vector of centered outcomes
std_X: standardized design matrix
K: a list with 2 elements. (1) s: vector with the eigenvalues of K, and (2) U: the eigenvectors of K (same as left singular values of X).
eta: the numeric value of the estimated eta parameter
trace: logical.
Column standardized design matrix. May include clinical covariates and other non-SNP data.
The number of observations in std_X (integer)
The number of features in std_X (integer)
The number of instances in the original design matrix X. This should not be altered by standardization.
The number of features in the original design matrix X, including constant features
Continuous outcome vector, centered.
Similarity matrix used to rotate the data. This should either be a known matrix that reflects the covariance of y, or an estimate (Default is \(\frac{1}{p}(XX^T)\), where X is standardized). This can also be a list, with components d and u (as returned by choose_k)
Logical: should K be a diagonal matrix? This would reflect observations that are unrelated, or that can be treated as unrelated. Passed from plmm().
Optional argument to input a specific eta term rather than estimate it from the data. If K is a known covariance matrix that is full rank, this should be 1.
Logical: is std_X an FBM type object? This is set internally by plmm().
If set to TRUE, inform the user of progress by announcing the beginning of each step of the modeling process. Default is FALSE.
Not used yet