fit_SKAT_NULL: Fit the null logistic mixed model and estimate the variance...

View source: R/SAIGE_SKAT_NULL_Model_usingSKATLib.R

fit_SKAT_NULLR Documentation

Fit the null logistic mixed model and estimate the variance ratio by a set of randomly selected variants

Description

Fit the null logistic mixed model and estimate the variance ratio by a set of randomly selected variants

Usage

fit_SKAT_NULL(
  kins = NULL,
  phenoFile = "",
  phenoCol = "",
  traitType = "quantitative",
  invNormalize = FALSE,
  covarColList = NULL,
  qCovarCol = NULL,
  sampleIDColinphenoFile = "",
  outputPrefix = "",
  isCovariateTransform = FALSE,
  sampleFileForDosages = "",
  methodforRelatedSample = "EMMAX",
  isDiagofKinSetAsOne = FALSE
)

Arguments

phenoFile

character. Path to the phenotype file

phenoCol

character. Column name for the trait e.g. "CAD"

traitType

character. e.g. "binary" or "quantitative". By default, "binary"

invNormalize

logical. Whether to perform the inverse normalization of the trait or not. E.g. TRUE or FALSE. By default, FALSE

covarColList

vector of characters. Covariates to be used in the glm model e.g c("Sex", "Age")

qCovarCol

vector of characters. Categorical covariates to be used in the glm model (NOT work yet)

sampleIDColinphenoFile

character. Column name for the sample IDs in the phenotype file e.g. "IID".

outputPrefix

character. Path to the output files with prefix.

methodforRelatedSample

character. The method to fit model for related samples. GMMAT or EMMAX

plinkFile

character. Path to plink file to be used for calculating elements of the genetic relationship matrix (GRM)

nThreads

integer. Number of threads to be used. By default, 1

numMarkers

integer (>0). Number of markers to be used for estimating the variance ratio. By default, 30

skipModelFitting

logical. Whether to skip fitting the null model and only calculating the variance ratio, By default, FALSE. If TURE, the model file ".rda" is needed

tauInit

vector of numbers. e.g. c(1,1), Unitial values for tau. For binary traits, the first element will be always be set to 1. If the tauInit is not specified, the second element will be 0.5 for binary traits.

memoryChunk

integer or float. The size (Gb) for each memory chunk. By default, 4

LOCO

logical. Whether to apply the leave-one-chromosome-out (LOCO) option.

traceCVcutoff

float. The threshold for coefficient of variantion (CV) for the trace estimator to increase nrun

isCateVarianceRatio

logical. Whether to estimate variance ratio based on different MAC categories. If yes, six categories will be used MAC = 1, 2, 3, 4, 5, >5. Currently, if isCateVarianceRatio=TRUE, then LOCO=FALSE

IsSparseKin

logical. Whether to exploit the sparsity of GRM to estimate the variance ratio. By default, TRUE

numRandomMarkerforSparseKin

integer (>0). Number of markers to be used for first estimating the relatedness between each sample pair if IsSparseKin is TRUE

relatednessCutoff

float. The threshold to treat two samples as unrelated if IsSparseKin is TRUE

Value

a file ended with .rda that contains the glmm model information, a file ended with .varianceRatio.txt that contains the variance ratio value, and a file ended with #markers.SPAOut.txt that contains the SPAGMMAT tests results for the markers used for estimating the variance ratio.


weizhouUMICH/SAIGE documentation built on May 6, 2022, 12:34 a.m.