GA.prelim {LGEWIS} | R Documentation |
The preliminary data management for GA (tests for genetic association)
Description
Before testing a specific region using a generalized score type test, this function does the preliminary data management, such as fitting the model under the null hypothesis.
Usage
GA.prelim(Y,time,X=NULL,corstr="exchangeable")
Arguments
Y |
The outcome variable, an n*1 matrix where n is the total number of observations |
time |
An n*2 matrix describing how the observations are measured. The first column is the subject id. The second column is the measured exam (1,2,3,etc.). |
X |
An n*p covariates matrix where p is the total number of covariates. |
corstr |
The working correlation as specified in 'geeglm'. The following are permitted: "independence", "exchangeable", "ar1". |
Value
It returns a list used for function GA.test().
Examples
library(LGEWIS)
# Load data example
# Y: outcomes, n by 1 matrix where n is the total number of observations
# X: covariates, n by p matrix
# time: describe longitudinal structure, n by 2 matrix
# G: genotype matrix, m by q matrix where m is the total number of subjects
data(LGEWIS.example)
Y<-LGEWIS.example$Y
X<-LGEWIS.example$X
time<-LGEWIS.example$time
G<-LGEWIS.example$G
# Preliminary data management
result.prelim<-GA.prelim(Y,time,X=X)
[Package LGEWIS version 1.1 Index]