glmTrain_fun: Gene-specific Generalized Linear Model fit statistics for...

Description Usage Arguments Details Value Examples

View source: R/superPC_model_GLM.R

Description

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

Usage

1

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

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.

Value

The slope coefficient from the GLM for each gene.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
  # DO NOT CALL THIS FUNCTION DIRECTLY.
  # Use SuperPCA_pVals() instead
  
## Not run:    
  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
  )

## End(Not run)
  

pathwayPCA documentation built on Dec. 15, 2020, 6:14 p.m.