Title: | Composite Kernel Association Test for Pharmacogenetics Studies |
---|---|
Description: | Composite Kernel Association Test (CKAT) is a flexible and robust kernel machine based approach to jointly test the genetic main effect and gene-treatment interaction effect for a set of single-nucleotide polymorphisms (SNPs) in pharmacogenetics (PGx) assessments embedded within randomized clinical trials. |
Authors: | Hong Zhang and Judong Shen |
Maintainer: | Hong Zhang <[email protected]> |
License: | GPL-2 |
Version: | 0.1.0 |
Built: | 2025-01-14 03:51:04 UTC |
Source: | https://github.com/cran/CKAT |
Composite kernel association test for SNP-set analysis in pharmacogenetics (PGx) studies.
CKAT(G, Tr, X, y, trait = "continuous", ker = "linear", grids = c(0, 0.5, 1), n_a = 1000, method = "liu", subdiv = 10^6)
CKAT(G, Tr, X, y, trait = "continuous", ker = "linear", grids = c(0, 0.5, 1), n_a = 1000, method = "liu", subdiv = 10^6)
G |
- genotype matrix. |
Tr |
- treatment vector, 0 indicates placebo, 1 indicates treatment. |
X |
- non-genetic covariates data matrix. |
y |
- response vector. Currently continuous and binary responses are supported. Survival response will be added soon. |
trait |
- response indicator. trait = "continuous" or "binary". |
ker |
- kernel. ker = "linear", "IBS", "Inter" (interaction kernel) and "RBF" (radial basis function kernel). |
grids |
- grids of the candidate weights. |
n_a |
- the number of intervals for manual integration (when integrate function fails). Default n_a = 1000. |
method |
- method for getting density of A (see details in the reference). Default method is Liu's method. |
subdiv |
- parameter of Davies' method. Default value is 1E6. |
pvals - p-values of each individual association test.
finalp - final p-value of the CKAT test.
nsamples = 500; nsnps = 10 X = rnorm(nsamples,0,1) Tr = sample(0:1,nsamples,replace=TRUE) G = matrix(rbinom(nsamples*nsnps, 1, 0.05), nrow = nsamples, ncol = nsnps) GxT = G*Tr Y0 = 0.5*X + Tr + rnorm(nsamples) CKAT(G, Tr, X, Y0, grids=c(0,0.5,1))
nsamples = 500; nsnps = 10 X = rnorm(nsamples,0,1) Tr = sample(0:1,nsamples,replace=TRUE) G = matrix(rbinom(nsamples*nsnps, 1, 0.05), nrow = nsamples, ncol = nsnps) GxT = G*Tr Y0 = 0.5*X + Tr + rnorm(nsamples) CKAT(G, Tr, X, Y0, grids=c(0,0.5,1))