CVFitMediator: Fit a single split in cross-validation for a given biomarker

View source: R/CVFitMediator.R

CVFitMediatorR Documentation

Fit a single split in cross-validation for a given biomarker

Description

The function trains a predictive model on the given training split and then predicts the genetically regulated intensity of it in the test split.

Usage

CVFitMediator(
  foldNum,
  parts.train,
  parts.test,
  pheno,
  snpCur,
  parallel = T,
  fixedEffects = NULL
)

Arguments

foldNum

integer, which fold of the k splits

parts.train

list, list of training indices

parts.test

list, list of test indices

pheno

vector, vector of standardized intensities of biomarker

snpCur

matrix, matrix of cis-genotypes to biomarker

parallel

logical, run in parallel?

Value

data frame of elastic net, lasso, and LMM based predictions


bhattacharya-a-bt/MOSTWAS documentation built on April 6, 2023, 12:20 a.m.