ggmix_data_object: Constructor functions for the different ggmix objects

Description Usage Arguments Value See Also

Description

new_fullrank_kinship, new_fullrank_K, new_fullrank_UD, new_lowrank_kinship, new_lowrank_K and new_lowrank_UD create the ggmix objects from the provided data that are necessary to fit the penalized linear mixed model according to the user's parameters.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
new_fullrank_kinship(x, y, kinship)

new_fullrank_K(x, y, K)

new_fullrank_UD(x, y, U, D)

new_lowrank_kinship(x, y, kinship, n_nonzero_eigenvalues, n_zero_eigenvalues)

new_lowrank_K(x, y, K, n_nonzero_eigenvalues, n_zero_eigenvalues)

new_lowrank_UD(x, y, U, D, n_nonzero_eigenvalues, n_zero_eigenvalues)

Arguments

x

input matrix, of dimension n x p; where n is the number of observations and p are the number of predictors.

y

response variable. must be a quantitative variable

kinship

positive definite kinship matrix

K

the matrix of SNPs used to determine the kinship matrix

U

left singular vectors corresponding to the non-zero eigenvalues provided in the D argument.

D

non-zero eigenvalues. This option is provided to the user should they decide or need to calculate the eigen decomposition of the kinship matrix or the singular value decomposition of the matrix of SNPs used to calculate the kinship outside of this function. This may occur, if for example, it is easier (e.g. because of memory issues, it's easier to calculate in plink). This should correspond to the non-zero eigenvalues only. Note that if you are doing an svd on the matrix of SNPs used to calculate the kinship matrix, then you must provide the square of the singular values so that they correspond to the eigenvalues of the kinship matrix. If you want to use the low rank estimation algorithm, you must provide the truncated eigenvalues and eigenvectors to the D and U arguments, respectively. If you want ggmix to truncate the eigenvectors and eigenvalues for low rank estimation, then provide either K or kinship instead and specify n_nonzero_eigenvalues.

n_nonzero_eigenvalues

the number of nonzero eigenvalues. This argument is only used when estimation="low" and either kinship or K is provided. This argument will limit the function to finding the n_nonzero_eigenvalues largest eigenvalues. If U and D have been provided, then n_nonzero_eigenvalues defaults to the length of D.

n_zero_eigenvalues

the number of desired or specified zero eigenvalues. This is only needed when estimation="lowrank", and is calculated internally by the ggmix function. It is equal to the number of observations minus n_nonzero_eigenvalues

Value

A ggmix object, of the class that corresponds to the estimation method. These objects are lists that contain the data necessary for computation. These functions are not meant to be called directly by the user

See Also

ggmix


ggmix documentation built on April 13, 2021, 9:06 a.m.