glmvector: GLM vector

Description Usage Arguments Value See Also

View source: R/glmvector.R

Description

Fits univariate GLMs for each of the predictors in your data set. Assumes that each column is a predictor.

Usage

1
glmvector(x, y, family = gaussian, swapxy = F)

Arguments

x

A predictor matrix with samples in the rows.

y

A response vector.

family

A description of the error distribution/link function for the glm. For more info see the documentation for glm.

swapxy

A logical value indicating that instead of regressing y on each column in x, you would like to regress the columns in x on y.

Value

an object of class "glmvector" with the following components:

glms

a list of univariate glms corresponding to the predictors in x.

pvalues

the p-values from the univariate regressions.

slopes

the estimated slopes from the regressions.

names

predictor names. Basically colnames(x)

See Also

glm


3inar/einr documentation built on May 5, 2019, 10:43 a.m.