powered by
Function to generate a matrix with values 0 or 1, where 0 indicating the entry is missing
gen.missing(pi_mat, symm = TRUE)
A numeric p x p matrix.
numeric
A numeric pxp matrix, for each entry, the value representing the probability of missing.
A logic scalar indicating if the output matrix needs to be symmetric.
logic
Haotian Xu
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