randomAnansi: Generate a random AnansiWeb or MultiFactor

randomAnansiR Documentation

Generate a random AnansiWeb or MultiFactor

Description

Randomly generate a valid AnansiWeb or MultiFactor object.

Usage

randomWeb(
  n_samples = 10,
  n_reps = 1L,
  n_features_x = 8,
  n_features_y = 12,
  sparseness = 0.5,
  tableY = NULL,
  tableX = NULL,
  dictionary = NULL
)

randomMultiFactor(n_types = 6, n_features = 100, sparseness = 0.5)

krebsDemoWeb(n_samples = 100, n_reps = 4L)

Arguments

n_samples, n_reps

⁠Numeric scalar⁠ Number of samples and repeated measures of those samples to be generated. Ignored if tableY and tableX are provided. (defaults: 10 samples without repeats)

n_features_y, n_features_x

⁠Numeric scalar⁠ Number of features to be generated. Ignored if tableY and tableX are provided.

sparseness

⁠Numeric scalar⁠, proportion: How rare are connections

tableY, tableX

A table containing features of interest. Rows should be samples and columns should be features. Y and X refer to the position of the features in a formula: Y ~ X.

dictionary

A binary adjacency matrix of class Matrix, or coercible to Matrix.

n_types

⁠Numeric scalar⁠, number of types of features to generate

n_features

⁠Numeric scalar⁠, number of features per type

Value

a randomly generated object of the specified class.

See Also

AnansiWeb(), MultiFactor()

Examples

# Make a random AnansiWeb object
randomWeb()
krebsDemoWeb()
randomMultiFactor()

thomazbastiaanssen/anansi documentation built on June 9, 2025, 3:59 p.m.