Description Usage Arguments Value Examples

Before testing a specific region using a generalized score type test, this function does the preliminary data management, such as pareparing spline basis functions for E etc..

1 2 |

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

`E` |
An n*1 environmental exposure. |

`X` |
An n*p covariates matrix where p is the total number of covariates. |

`E.method` |
The method of sieves for the main effect of E. It can be "ns" for natural cubic spline sieves; "bs" for B-spline sieves; "ps" for polynomial sieves. The default is "ns". |

`E.df` |
Model complexity for the method of sieves, i.e., number of basis functions. The default is sqrt(m). |

`corstr` |
The working correlation as specified in 'geeglm'. The following are permitted: "independence", "exchangeable", "ar1". |

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ```
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
# E: environmental exposure, n by 1 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;time<-LGEWIS.example$time;
E<-LGEWIS.example$E;X<-LGEWIS.example$X;G<-LGEWIS.example$G
# Preliminary data management
result.prelim<-GEI.prelim(Y,time,E,X=X)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.

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.