gamLoessScan: Variants (Biomarkers, e.g., genomic (genetic loci),...

View source: R/gamLoessScan.R

gamLoessScanR Documentation

Variants (Biomarkers, e.g., genomic (genetic loci), transcriptomic (gene expression), epigenomic (methylations), proteomic(protein), metabolomic (metabolites) variants) Scanning and Association Tests Using Generalized Additive Model with Local Polynomial Regression (LOESS).

Description

Fitting a Generalized Additive Mixed Models (GAMM) with Local Polynomial Regression in association testing.

Usage

gamLoessScan(genotype, traits, U, cv_method = "adaptive_cv", 
model_metric = "RMSE", n_hyperparameter_search = 10,verbose=TRUE, ...)

Arguments

genotype

Varants/genotypes matrix coding in reference allele (0,1,2) or variant count

traits

Traits

U

Covariates or confounding factors

cv_method

Cross-validation

model_metric

Model performance metrics, based on which the optimal model is determined.

n_hyperparameter_search

Number of hyperparameters for tuning

verbose

whether print training messages.

...

other arguments passing to generalized additive mixed models (gam)

Details

Fits the specified generalized additive mixed model (GAMM) with LOESS smoothness.

Value

The weights of variants as well as their p-values

References

Wood S.N. (2006b) Generalized Additive Models: An Introduction with R. Chapman and Hall/CRC Press.

Wang, Y. (1998) Mixed effects smoothing spline analysis of variance. J.R. Statist. Soc. B 60, 159-174.

Lin, X and Zhang, D. (1999) Inference in generalized additive mixed models by using smoothing splines. JRSSB. 55(2):381-400.

Examples

# not run
f <- system.file('extdata',package='VariantScan')
infile <- file.path(f, "sim1.csv")
geno=read.csv(infile)

traitq=geno[,14]
genotype=geno[,-c(1:14)]
PCs=prcomp(genotype)
test=gamLoessScan(genotype =genotype,traits =(traitq),U=PCs$x[,1:2],n_hyperparameter_search=5)


VariantScan documentation built on June 30, 2022, 5:05 p.m.