para_est_new: Parameter estimates based on two-way approximation

View source: R/data_representation.R

para_est_newR Documentation

Parameter estimates based on two-way approximation

Description

This function returns a vector consists of parameter estimates for overall offset, cell effect, and gene effect.

Usage

para_est_new(test_set)

Arguments

test_set

A UMI count data matrix with genes as rows and cells as columns

Details

This is a function used to calculate parameter estimates based on λ_{gc} = e^{μ + α_g + β_c}, where μ is the overall offset, α is a vector with the same length as the number of genes, and β is a vector with the same length as the number of cells. The order of elements in vectors α or β is the same as rows (genes) or cells (columns) from input data. Be sure to remove cells/genes with all zeros.

Value

A numeric vector containing parameter estimates from overall offset (first element), gene effect (same order as rows) and cell effect (same order as columns).

Examples

# Matrix as input
test_set <- matrix(rpois(500, 0.5), nrow = 10)
para_est_new(test_set)


scpoisson documentation built on Aug. 17, 2022, 9:05 a.m.