glmTrain_fun {pathwayPCA} | R Documentation

## Gene-specific Generalized Linear Model fit statistics for supervised PCA

### Description

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

### Usage

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

### 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

      # 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)

[Package pathwayPCA version 1.10.0 Index]