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

Description Usage Arguments Value Examples

View source: R/sigma_moment.R

Description

Estimate the covariance matrix using moment method for PLN model.

Usage

1
2
3
4
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# Library package
library(MASS)
library(CVXR)
library(EQUAL)

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

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

XiDsLab/DtracePLN documentation built on Dec. 18, 2021, 7:21 p.m.