sigma_momest: Estimate the covariance matrix using moment method for PLN...

View source: R/sigma_moment.R

sigma_momestR Documentation

Estimate the covariance matrix using moment method for PLN model

Description

Estimate the covariance matrix using moment method for PLN model.

Usage

sigma_momest(
  data_use,
  S_depth
)

Arguments

data_use

The matrix of count data.

S_depth

A Vector, which contains the library size estimation.

Value

The estimated covariance matrix for PLN model by using moment method.

Examples

# Library package
library(MASS)
library(CVXR)
library(EQUAL)

##
# Generator the syntheic data
data_generator_res<-DtracePLN::data_generator(n = 100, p = 50, densy_degree = 0.05,
sd_ls = 0.1, mean_ls = log(10),value_nondiagonal = 0.3)

##
S_depth<-DtracePLN::compute_offset(counts = data_generator_res$obs_mat,offset = "TSS")
cov_Y1<-DtracePLN::sigma_momest(data_use = data_generator_res$obs_mat,S_depth = S_depth)


git-tjj/DtracePLN documentation built on Jan. 30, 2023, 1:47 a.m.