getModVars: Retrieve variables from models fitted in the "estimatePCVar"...

Description Usage Arguments Value

View source: R/parameterEstimation.R

Description

Given fitted models and the names for each cell state, retrieve for each cell state: the centroids (fixed effect), residual variance-covariance matrices (residuals), batch-associated variances (random effect variance), and sample associated variances (random effect variance).

Usage

1
getModVars(mods, npcs, clusNames)

Arguments

mods

A list of lme4 odels that this function will extract the variables from

npcs

The number of PCs whose variance will be deconvoluted. As this function's output is used as direct input for our simulation functions, this will determine how many PCs your generated datasets will contain (e.g. npcs = 20 here will mean that the generated datasets will contain 20 PCs).

clusNames

A list of unique names of the cell state cluster assignments

Value

Returns a list containing the following elements: a matrix containing the mean PC values for each cell state, a list where each element is the residual variance-covariance matrix for each cell state, a matrix containing the batch-associated variance for each cell state in each PC, a matrix containing the sample-associated variance for each cell state in each PC.


immunogenomics/scpost documentation built on July 28, 2021, 4:03 a.m.