gen.missing: Function to generate a matrix with values 0 or 1, where 0...

View source: R/general_functions.R

gen.missingR Documentation

Function to generate a matrix with values 0 or 1, where 0 indicating the entry is missing

Description

Function to generate a matrix with values 0 or 1, where 0 indicating the entry is missing

Usage

gen.missing(pi_mat, symm = TRUE)

Arguments

pi_mat

A numeric pxp matrix, for each entry, the value representing the probability of missing.

symm

A logic scalar indicating if the output matrix needs to be symmetric.

Value

A numeric p x p matrix.

Author(s)

Haotian Xu

Examples

p = 5
pi_mat = matrix(0.9, p, p)
eta_mat = gen.missing(pi_mat, symm = TRUE)

changepoints documentation built on Sept. 4, 2022, 5:06 p.m.