BootstrapEdgeDistn: Penalized Partial Correlation Distribution Estimates

Description Usage Arguments Value Examples

View source: R/Bootstrap_Edge_distn.R

Description

Estimates MRFs from bootstrapped subsamples of data to approximate penalized partial correlation distibutions

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
BootstrapEdgeDistn(
  x,
  L1,
  vertices = NULL,
  subset = NULL,
  B = 500,
  n_b = 0.5,
  replace = TRUE,
  seed = NULL,
  ...
)

Arguments

x

dataset for estimating MRFs. Supplied as data.frame.

L1

Regularization penalty for inducing sparsity in networks

vertices

Vertices to include in MRF. Must be a subset of names(x)

subset

An expression to select a subset of records/rows

B

The number of subsamples to draw

n_b

The size of the subsamples. May be provided as an integer less than the number of rows in x, or as a proportion.

replace

Logical. Is subsampling done with (T) or without (F) replacement.

seed

Random seed value for reproducibility.

...

other arguments to be passed to Rnet().

Value

A numeric matrix containing the estimated penalized partial correlations corresponding to the MRF edges (column) in each subsample (row).

Examples

1
2
3
4
5
6
 BootstrapEdgeDistn(
   x = NARMS_EC_DATA,
   L1 = 0.25,
   vertices = c('AMP', 'AMC', 'AXO', 'FOX', 'TIO', 'TET', 'CHL', 'GEN', 'STR'),
   subset = expression(Year == 2009)
   )

EpidemiologyDVM/duke-rnet-quick documentation built on Dec. 17, 2021, 7:20 p.m.