MCmat: MCmat

View source: R/MCmat.R

MCmatR Documentation

MCmat

Description

This function simulates MC step for an entire matrix. Should not need to be used by user directly; available to help with determining network estimation.

Usage

MCmat(
  Y,
  W,
  eY,
  N,
  Q,
  base,
  sigma,
  MCiter,
  stepsize = 1,
  perturbation = 0.05,
  network = "default",
  ncores = 1,
  ...
)

Arguments

Y

logratio matrix

W

corresponding count matrix

eY

current expected value of logratio matrix

N

number of samples, or nrow of Y

Q

number of OTUs, or ncol of W

base

OTU index used for base

sigma

current estimate of sigma

MCiter

number of MC samples to generate

stepsize

variance used for MH samples, defaults to 1. Tweak to adjust acceptance ratio

perturbation

size of purturbation used for to_log_ratios, defaults to 0.05

network

How to estimate network. Defaults to "default" (generalised inverse, aka naive). Other options include "diagonal", or a function that takes a sample covariance matrix and returns an estimate of the inverse covariance matrix (eg glasso or SpiecEasi)

ncores

number of cores to use, defaults to 1

...

additional arguments to be supplied to the network function

Author(s)

Bryan Martin

Amy Willis


adw96/DivNet documentation built on Oct. 2, 2023, 11:49 a.m.