olsTrain_fun: Gene-specific Regularized Ordinary Least Squares fit...

Description Usage Arguments Details Value Examples

View source: R/superPC_model_LS.R

Description

Model statistics for Ordinary Least Squares (OLS) regression by gene.

Usage

1
olsTrain_fun(x, y, s0.perc = NULL)

Arguments

x

An p \times n predictor matrix.

y

A response vector.

s0.perc

Percentile of the standard error of the slope estimate to be used for regularization. The Default value of NULL will use the median of this distribution.

Details

This function calculates the Sxx, Syy, and Sxy sums from the gene- specific OLS models, then calculates estimates of the regression slopes for each gene and their corresponding regularized test statistics,

t = \hat{β} / (sd + e),

where e is a regularization parameter.

If s0.perc is NULL, then e is median of the sd values. Otherwise, e is set equal to quantile(sd, s0.perc).

Value

A list of OLS model statistics:

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
  # 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)
  time_int <- rpois(n, lambda = 365 * 2)
  
  olsTrain_fun(
    x = x_mat,
    y = time_int
  )

## End(Not run)
  

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