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

Ruzong Fan and Yifan Wang, NICHD/NIH, April 2014

1 Overview

This document describes a R package to implement the models for functional linear models for association analysis of quantitative traits. Section 2 briefly describes the installation of the program. Section 3 explains how to run the program using one example. Section 4 offers explanation of the results and warnings to use the programs.

The theoretical basis for this program is given in our research paper in References. Please refer to the reference if you use the program in any published work. In case of suggestions and questions and/or problems, you can contact us via e-mail (fanr@mail.nih.gov).

2 Download and Installation

The package is written in R. First, download the package “FLM beta smooth only.R”, “FLM FPCA.R”, “FLM FPCA no position.R”, “FLM fixed model June 2013.R”, and “FLM Example from SKAT.R” from FLM web.zip. Put the files in a directory you may access.

3 How to Run the Program

The package needs libraries fda, MASS, SKAT, and Matrix in R package. Make sure to install them before running our codes. Open the “Example from SKAT.R” file on an R Console in a PC window. Change the paths leading to the directory of the package “FLM beta smooth only.R”, “FLM FPCA.R”, “FLM FPCA no position.R”, and “FLM fixed model June 2013.R” on your com­puter. Then, you may run the program. The following results are based on the dataset in SKAT.

> data = data(SKAT.example)
> names(SKAT.example)
[1] "Z" "X" "y.c" "y.b"
> attach(SKAT.example)
> pheno = y.c
> geno = Z
> covariate = X
> pos = c(1:67)
> order = 4
> bbasis = 15
> gbasis = 15
> fbasis = 25
> gfasis = 25

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

$LRT
[1] 0.5407361
$Chisq
[1] 0.5407361
$F
[1] 0.5409482

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

$LRT
[1] 0.1563694
$Chisq
[1] 0.1563694
$F
[1] 0.1584694

> flm_beta_smooth_only(pheno, mode = "Additive", geno, pos, order, bbasis, covariate, base = "bspline", interaction = FALSE)

$LRT
[1] 0.5407361
$Chisq
[1] 0.5407361
$F
[1] 0.5409482

> flm_beta_smooth_only(pheno, mode = "Additive", geno, pos, order, fbasis, covariate, base = "fspline", interaction = FALSE)

$LRT
[1] 0.1563694
$Chisq
[1] 0.1563694
$F
[1] 0.1584694

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

$LRT
[1] 0.4537936
$Chisq
[1] 0.4537936
$F
[1] 0.4542006

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

$LRT
[1] 0.6493368
$Chisq
[1] 0.6493368
$F
[1] 0.649297

4 Explanation of the Results and Warnings

As shown in the Section 3, our program can output 3 p-values based on likelihood ratio test (LRT), X2, and F-distributed test. The LRT is the same as X2, which may inflate type I error rates when sample size is smaller than or equal to 1,000 (Fan et al. 2013, p733, top of the left column). The F-distributed test has conservative and accurate type I error rates (Fan et al. 2013). If you use the R codes to analyze your data, we recommend to report the p-values of F -distributed test. If you analyze large sample data, both LRT and F-distributed tests can be used.

5 References

  1. Fan RZ, Wang YF, Mills JL, Wilson AF, Bailey-Wilson JE, and Xiong MM (2013) Functional linear models for association analysis of quantitative traits. Genetic Epidemiology, 37, 726-742.
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