Description Usage Arguments Details Value Author(s) Examples

Selects a significant non-additive interaction between two variables using a fast GLM implementation.

1 |

`y` |
response variable, of length |

`x1` |
the first predictor, of length |

`x2` |
the second predictor, of length |

`thr` |
p-value tolerance. Truncate any p-value to 1 if it is larger than |

`family` |
a character string specifying the model to use, valid options are: -
`"gaussian"` least squares regression (regression), -
`"binomial"` logistic regression (classification).
Default is |

Motivated by pairwise gene interaction selection in genome-wide association study (GWAS),
this package implements fast and simplified least squares,
and logistic regression for efficiently selecting
a significant non-additive interaction between two variables.
Once user specifies the response variable `y`

and predictors `x1`

and `x2`

,
then a least squares model (`"gaussian"`

) `y ~ x1 + x2 + x1*x2`

or a logistic regression (`"binomial"`

) `logit ~ x1 + x2 + x1*x2`

is fitted.
Users can then select the significant x1*x2 term using returned Wald test p-value.

A matrix of coefficients.

Yi Yang

Maintainer: Yi Yang <[email protected]>

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ```
n = 10000
x1 = rnorm(n)
x2 = rnorm(n)
y1 = sample(c(0,1),n,rep=TRUE)
y2 = rnorm(n)
system.time(m1 <- ezglm(y1, x1, x2, 1, family = "binomial"))
m1
system.time(m2 <- glm(y1~x1+x2+x1*x2, family = binomial))
summary(m2)$coef
system.time(m3 <- ezglm(y2, x1, x2, 1, family = "gaussian"))
m3
system.time(m4 <- glm(y2~x1+x2+x1*x2, family = gaussian))
summary(m4)$coef
``` |

emeryyi/ezglm documentation built on May 13, 2017, 5:11 p.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.