sGBJ_scores: Compute the sGBJ statistic along with its p-value quantifying...

Description Usage Arguments Value Examples

View source: R/sGBJ_scores.R

Description

Compute the sGBJ statistic along with its p-value quantifying the association between a gene set and survival outcome

Usage

1
sGBJ_scores(surv, factor_matrix, covariates = NULL, nperm = 300)

Arguments

surv

a Surv object of length n

factor_matrix

a n x p data.frame of the expression for the particular gene set of interest being tested

covariates

a n x l matrix of the covariates to adjust upon. Default is NULL

nperm

number of permutations performed to estimate the epsilon matrix. Default is 300.

Value

a list containing the sGBJ statistic estimation and its associated p-value

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
 n <- 100
 surv_data <- data.frame(Time = runif(n = n, min = 0, max = 100),
                         event = rbinom(n = n, size = 1, prob = 0.5))
 surv <- survival::Surv(time = surv_data$Time, event = surv_data$event)

 factor_matrix <- data.frame(P1 = rnorm(n = n),
                              P2 = rnorm(n = n))

 sGBJ::sGBJ_scores(surv,factor_matrix, nperm = 2)

 # with covariates

 covariates <- data.frame(age = runif(n = n, 60, 90))

 sGBJ_scores(surv,factor_matrix, nperm = 2, covariates = covariates)

sGBJ documentation built on Sept. 16, 2021, 1:07 a.m.