Learn R Programming

changepoints (version 1.1.0)

gen.missing: 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)

Value

A numeric p x p matrix.

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.

Author

Haotian Xu

Examples

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

Run the code above in your browser using DataLab