Description Usage Arguments Value Examples

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

1 |

`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. |

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ```
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.
``` |

LGRF documentation built on May 2, 2019, 10:59 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.