SNPxAGE_model: Flexibly modeling the age/phenotype association by genetic...

Description Usage Arguments Value Author(s) References

View source: R/SNPxAGE_model.R

Description

Takes a genetic variant or single nucleotide polymorphism (SNP) and a phenotype it's associated with and estimates how the relationship between the two varies with age using splines.

Usage

1
SNPxAGE_model(data, SNP, phenotype, age, covars, k = 3, pred_ages, type = "cr")

Arguments

data

A data frame containing the SNP, age and phenotype variables

SNP

A character string with the name of the SNP variable in the data frame. This variable itself must be a factor variable containing at most 3 unique values indicating the number of copies

phenotype

A character string with the name of the phenotype variable in the data frame

age

A character string with the name of the age variable in the data frame

covars

A character vector with the names of the variables to be adjusted for (e.g. principal components)

type

A character string with the type splines to be used (see mgcv function)

knots

A numeric value indicating the number of internal knots (default 3)

Value

A list including the model and parameters used. If pred_ages is supplied then the predictions for those ages is also returned.

Author(s)

Jeremy A Labrecque, j.labrecque@erasmusmc.nl

References

TBA


jalabrecque/MRchecks documentation built on Dec. 20, 2021, 9:01 p.m.