Description Usage Arguments Details Examples

Generalized least squares using precomputed eigen decomposition of covariance matrix for many test variables

1 2 |

`Y` |
response variable |

`X` |
matrix of covariates, usually just a mean term |

`U` |
eigen vectors of covariance matrix |

`lambda` |
eigen values of covariance matrix. If not specified, set all values to 1 |

`rank` |
number of eigen vectors of U to use |

`X_test_lst` |
list of matries to be tested one at a time |

`smethod` |
placeholder argument |

`quantileTransform` |
Use a non-parametric test that only uses the ranks of the transformed test statistics. |

Fits glslr() for a large set of covariates one at a time. glslrApply() performs the preprocessing a single time, so a much faster than applying gslr() to each test separately

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | ```
library(mvtnorm)
library(clusterGeneration)
# number of samples
N = 100
# Generate positive definite covariance matrix
C = genPositiveDefMat(N)$Sigma
# simulate response from covariance matrix C
y = t(rmvnorm(1, rep(0, N), C))
# eigen decomposition of matrix C
dcmp = eigen(C)
U = dcmp$vectors
lambda = dcmp$values
# Intercept term
X = rep(1,N)
# simulate 2 random covariates to test one at a time
X_test_lst = list(rnorm(N), rnorm(N))
# same result using faster glslrApply() for many tests
glslrApply(y, X, U, lambda, X_test_lst=X_test_lst)
``` |

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.