Skip Navigation
  Print Page

Biostatistics and Bioinformatics Branch (BBB)

Skip sharing on social media links
Share this:

Functional Linear Models for Association Analysis of Quantitative Traits

Example from SKAT

library(fda)
library(MASS)
library(SKAT)
library(Matrix)

source("C:/NICHD/Research/software/Fan/Func_Linear_Model/FLM_web/FLM_fixed_model_June_2013.R")
source("C:/NICHD/Research/software/Fan/Func_Linear_Model/FLM_web/FLM_FPCA.R")
source("C:/NICHD/Research/software/Fan/Func_Linear_Model/FLM_web/FLM_FPCA_no_position.R")
source("C:/NICHD/Research/software/Fan/Func_Linear_Model/FLM_web/FLM_beta_smooth_only.R")

data = data(SKAT.example)
names(SKAT.example)
attach(SKAT.example)

pheno = y.c
geno = Z
covariate = X
pos = c(1:67)

order = 4

bbasis = 15
gbasis = 15
fbasis = 25
gfasis = 25

######################

Fixed_bspline_pvalue = flm_fixed_model_June_2013(pheno, mode = "Additive", geno, pos, order, bbasis, fbasis, gbasis, covariate, base = "bspline", interaction = FALSE)
Fixed_fspline_pvalue = flm_fixed_model_June_2013(pheno, mode = "Additive", geno, pos, order, bbasis, fbasis, gfasis, covariate, base = "fspline", interaction = FALSE)

Fixed_bspline_pvalue

Fixed_fspline_pvalue

#############

fit.beta.smooth.only.bs = flm_beta_smooth_only(pheno, mode = "Additive", geno, pos, order, bbasis, covariate, base = "bspline", interaction = FALSE)

fit.beta.smooth.only.bs

fit.beta.smooth.only.fs = flm_beta_smooth_only(pheno, mode = "Additive", geno, pos, order, fbasis, covariate, base = "fspline", interaction = FALSE)

fit.beta.smooth.only.fs

#############################

fpca.no.position = flm_fpca_no_position(pheno, mode = "Additive", geno, covariates = SKAT.example$X, kz = 20, kb = 10, smooth.cov=FALSE, family = "gaussian")

fpca.no.position

fpca = flm_fpca(pheno, mode = "Additive", geno, covariates = SKAT.example$X, pos, kz = 20, kb = 10, smooth.cov=FALSE, family = "gaussian")

fpca

Last Updated Date: 04/25/2014
Last Reviewed Date: 04/25/2014

Contact Information

Name: Dr Paul Albert
Chief and Senior Investigator
Biostatistics and Bioinformatics Branch
Phone: 301-496-5582
E-mail: albertp@mail.nih.gov

Staff Directory
Vision National Institutes of Health Home BOND National Institues of Health Home Home Storz Lab: Section on Environmental Gene Regulation Home Machner Lab: Unit on Microbial Pathogenesis Home Division of Intramural Population Health Research Home Bonifacino Lab: Section on Intracellular Protein Trafficking Home Lilly Lab: Section on Gamete Development Home Lippincott-Schwartz Lab: Section on Organelle Biology