SNPinter {FunctanSNP} | R Documentation |
Revised partially functional interaction regression analysis for the sequence (genotypes) data
Description
This function conducts joint analysis, which includes all scalar covariates Z, genetic variant function X(t), and their interactions in a partially functional interaction regression model. In addition, this function identifies the relevant genetic variation sites with a local sparsity penalty-based method.
Usage
SNPinter(y, z, location, X, lambda1, lambda2 = NULL, eta, type1, nbasis1,
params1, Bsplines = 20, norder = 4, intercept = FALSE,
eps = 1e-05, maxstep = 1e+05, Plot = FALSE)
Arguments
y |
a numeric vector defining the response variables. |
z |
a matrix defining 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 (genotypes) data, with the number of rows equal to the number of samples. |
lambda1 |
a numeric vector specifying the sparsity penalty parameter to be determined. |
lambda2 |
a numeric vector specifying the group sparsity penalty parameter to be determined. |
eta |
a numeric vector specifying the penalty parameter for smoothing analysis. |
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". |
nbasis1 |
an integer specifying the number of basis functions that constitutes the genetic variation 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;
|
Bsplines |
an integer specifying the number of basis functions that constitutes the genetic effect function. |
norder |
an integer specifying the order of bsplines that constitutes the genetic effect function, which is one higher than their degree. The default of 4 gives cubic splines. |
intercept |
should intercept(s) be fitted (TRUE) or set to zero (default = FALSE). |
eps |
a numeric variable specifying the threshold at which the algorithm terminates, default is 1e-5. |
maxstep |
a numeric variable specifying the maximum iteration steps, default is 1e5. |
Plot |
should the estimated genetic effect function beta0(t) and interaction items betak(t) be plotted (TRUE) or not (default = FALSE). |
Value
An "SNPinter" object that contains the list of the following items.
alpha: estimated intercept value..
gamma: estimated coefficients of the scalar covariates.
b: estimated coefficients of the chosen basis functions for the genetic effect function beta0(t) and interaction items betak(t).
betat: an "fd" object, representing the estimated genetic effect function beta(t) and interaction items betak(t).
residuals: the residuals, that is response minus fitted values.
fitted.values: the fitted mean values.
See Also
See Also as simData1
, SNPcvinter
.
Examples
library(FunctanSNP)
n <- 300
m <- 30
simdata2 <- simData2(n, m, seed = 123)
y <- simdata2$y
z <- simdata2$z
location <- simdata2$location
X <- simdata2$X
lambda1 <- 0.05
lambda2 <- sqrt(3)*lambda1
eta <- 0
SNPinterres <- SNPinter(y, z, location, X, lambda1, lambda2, eta, type1 = "Bspline",
nbasis1 = 5, params1 = 4, Bsplines = 5, norder = 4, intercept = TRUE,
eps = 1e-2, maxstep = 1e2, Plot = TRUE)
SNPinterres$alpha
SNPinterres$gamma
SNPinterres$b