Model statistics for Generalized Linear Model (GLM) regression by gene

glmTrain_fun(x, y, family = binomial)

Arguments

x

An \(p \times n\) predictor matrix.

y

A response vector.

family

A description of the error distribution and link function to be used in the model. The default is binomial(link = "logit").

Value

The slope coefficient from the GLM for each gene.

Details

While this function currently supports any GLM family from the family function, this function is only called in the model fitting step (via the internal superpc.train) function and not in the test statistic calculation step (in the superpc.st function). We would like to support Poisson regression through the glm function, as well as n-ary classification through multinom and ordinal logistic regression through polr.

Examples

# DO NOT CALL THIS FUNCTION DIRECTLY. # Use SuperPCA_pVals() instead if (FALSE) { p <- 500 n <- 50 x_mat <- matrix(rnorm(n * p), nrow = p, ncol = n) obs_logi <- sample( c(FALSE, TRUE), size = n, replace = TRUE, prob = c(0.2, 0.8) ) glmTrain_fun( x = x_mat, y = obs_logi ) }