null.LGRF {LGRF}R Documentation

Fit the null model for longitudinal genetic random field model

Description

Before testing a specific region using a score test, this function fits the longitudinal genetic random field model under the null hypothesis.

Usage

null.LGRF(Y, time, X = NULL)

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.

Value

It returns a list used for function test.LGRF().

Examples

library(LGRF)

# 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
# Z: genotype matrix, m by q matrix where m is the total number of subjects

data(LGRF.example)
Y<-LGRF.example$Y;time<-LGRF.example$time;X<-LGRF.example$X;Z<-LGRF.example$Z

# Fit the null model
result.null<-null.LGRF(Y,time,X=cbind(X,time[,2]))

# *Please note that the second column of time should be included as a covairate if
# the gene by time interaction effect will be incorperated.  

[Package LGRF version 1.0 Index]