iProMix.LRT.matrix: For Y matrix with multiple genes/proteins/variables,...

Description Usage Arguments Value Examples

View source: R/iProMix.LRT.matrix.R

Description

For Y matrix with multiple genes/proteins/variables, calculate the likelihood ratio test statistics (as well as chisq p-value) for iProMix

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
iProMix.LRT.matrix(
  yMatrix,
  x,
  cov = NULL,
  pi,
  reduce1 = c(2, 1),
  reduce2 = NULL,
  tuningPar = 1e-06,
  cl = FALSE
)

Arguments

yMatrix

The quantitative measure (e.g. protein/expression) of a gene in the matrix form (Row: Genes; Columns: Samples)

x

The quantitative measure of anther gene (e.g. ACE2 protein levels) that we would like to know their cell-type specific dependency with Y

cov

The covariates for adjustment. Their impact on the mean value of X and Y are adjusted

pi

The proportion of cell type 1

reduce1

A index of the row and column of the variance-covariance matrix that should be forced to be zero in cell type 1. Default is NULL.

reduce2

A index of the row and column of the variance-covariance matrix that should be forced to be zero in cell type 2. Default is NULL.

tuningPar

Default is 1e-8. It is used in the embedded graphic lasso procedure for estimating correlation. A larger tuningPar can be selected if one is interested in penalized estimates.

cl

True of False. If true, parallel computing is used; need the library(doRNG). Default is FALSE

Value

list with number of elements equal to the number of genes for the yMatrix. Each gene contains a sublist with 10 elements. It contains

var1:

The estimated (y,x) variance of cell type 1

var2:

The estimated (y,x) variance of cell type 2

mu1:

The estimated (y,x) mean function of cell type 1

mu2:

The estimated (y,x) mean function of cell type 2

cor.score1:

The estimated X-Y correlation in cell type 1

cor.score2:

The estimated X-Y correlation in cell type 2

full.ll:

The estimated log likelihood function from the full model

reduced.ll:

The estimated log likelihood function from the reduced model

LRT:

The likelihood ratio test statistics for iProMix

LRT.pvalue:

The chisq p-value for iProMix

Examples

1
2
3
4
5
6
library(iProMix)
set.seed(111)
y <- matrix(rnorm(100,10,1), ncol=10)
x <- rnorm(10,10,1)
pi <- runif(10)
iProMix_result <- iProMix.LRT.matrix(yMatrix = y, x = x, pi = pi, reduce1=c(2,1), reduce2=NULL)

JiayiJi/iProMix documentation built on Dec. 18, 2021, 1:30 a.m.