mi_bootstrap: mi_bootstrap

View source: R/mi_bootstrap.R

mi_bootstrapR Documentation

mi_bootstrap

Description

Internal function to calculate bias and sd of MIS via bootstrap

Usage

mi_bootstrap(
  data,
  marginal_description,
  theta,
  log_p_y,
  p_y_given_x_3d,
  dim_visible,
  smooth_marginals,
  n_permutes = 20,
  logpx_method
)

Arguments

data

Data provided by user

marginal_description

Character string which determines the marginal distribution of the data.

theta

List of estimated parameters

log_p_y

A 2D matrix representing the log of the marginal probability of the latent variables

p_y_given_x_3d

A 3D array of numerics in range (0, 1), that represent the probability that each observed x variable belongs to n_hidden latent variables of dimension dim_hidden. p_y_given_x_3d has dimensions (n_hidden, n_samples, dim_hidden).

dim_visible

The dimension of the data provided in data - i.e. the number of discrete levels that exist in the data. Must be positive integer.

smooth_marginals

Boolean (TRUE/FALSE) which indicates whether Bayesian smoothing of marginal estimates should be used.

n_permutes

numeric to specify number of bootstrap estimates to calculate. Default = 20

logpx_method

EXPERIMENTAL - A character string that controls the method used to calculate log_p_xi. "pycorex" uses the same method as the Python version of biocorex, "mean" calculates an estimate of log_p_xi by averaging across n_hidden estimates.

Value

Returns a list


jpkrooney/rcorex documentation built on July 25, 2022, 1:37 a.m.