SNPlm {FunctanSNP}R Documentation

Revised functional linear regression analysis for the sequence (genotypes) data

Description

This function models the genetic effect of genetic variants by relating the genetic variant function to the phenotype adjusting for covariates.

Usage

SNPlm(y, z, location, X, type1, type2, nbasis1, nbasis2, params1, params2,
  intercept = FALSE, Plot = FALSE)

Arguments

y

a numeric vector specifying the response variables.

z

a matrix specifying the scalar covariates, with the number of rows equal to the number of samples.

location

a numeric vector defining the sampling sites of the sequence data.

X

a matrix specifying the sequence data, with the number of rows equal to the number of samples.

type1

a character specifying the type of the basis functions that constitutes the genetic variation function. The options are "Bspline", "Exponential", "Fourier", "Monomial", and "Power".

type2

a character specifying the type of the basis functions that constitutes the genetic effect function. The options are "Bspline", "Exponential", "Fourier", "Monomial", and "Power".

nbasis1

an integer specifying the number of basis functions that constitutes the genetic variation function.

nbasis2

an integer specifying the number of basis functions that constitutes the genetic effect function.

params1

in addition to rangeval1 (a vector of length 2 giving the lower and upper limits of the range of permissible values for the genetic variation function) and nbasis1, all bases have one or two parameters unique to that basis type or shared with one other;

params2

in addition to rangeval1 (a vector of length 2 giving the lower and upper limits of the range of permissible values for the genetic effect function) and nbasis1, all bases have one or two parameters unique to that basis type or shared with one other;

  • bspline: Argument norder = the order of the spline, which is one more than the degree of the polynomials used. This defaults to 4, which gives cubic splines.

  • exponential: Argument ratevec. In fda_2.0.2, this defaulted to 1. In fda_2.0.3, it will default to 0:1.

  • fourier: Argument period defaults to diff(rangeval).

  • monomial/power: Argument exponents. Default = 0:(nbasis-1). For monomial bases, exponents must be distinct nonnegative integers. For power bases, they must be distinct real numbers.

intercept

should intercept(s) be fitted (TRUE) or set to zero (default = FALSE).

Plot

should the estimated genetic effect function beta(t) be plotted (TRUE) or not (default = FALSE).

Value

An "SNPlm" object that contains the list of the following items.

See Also

See Also as SNPgvf.

Examples

library(FunctanSNP)
n <- 300
m <- 30
simdata1 <- simData1(n, m, seed = 123)
y <- simdata1$y
z <- simdata1$z
location <- simdata1$location
X <- simdata1$X
SNPlmres <- SNPlm(y, z, location, X, type1 = "Bspline", type2 = "Bspline", nbasis1 = 5,
                  nbasis2 = 5, params1 = 4, params2 = 4, intercept = FALSE, Plot = TRUE)
SNPlmres$alpha
SNPlmres$gamma
SNPlmres$b

[Package FunctanSNP version 0.1.0 Index]