glm.init: Initializes parameter estimates

Description Usage Arguments Value

View source: R/FSCseq.R

Description

Uses glm() and phi_ml_g() functions to initialize estimates at the beginning of EM algorithm.

Usage

1
glm.init(j, y_j, XX, k, offsets, wts, keep)

Arguments

j

integer, gene index j

y_j

vector of length n, expression of gene j

XX

matrix of dimension nk by k+p, design matrix

k

integer, number of clusters

offsets

numeric vector of length n, subject-specific offsets

wts

matrix of dimension k by n, E step weights

keep

logical matrix of dimension k by n, whether a sample is included in calculation for cluster k

Value

list containing outputs coefs_j: vector of length k corresponding to each cluster log2 baseline, phi_g: Overdispersion estimate


DavidKLim/FSCseq documentation built on Dec. 12, 2021, 3:46 a.m.