Creates the Z and W matrices and a list of sampled subsets, S, for SPVIM estimation.
sample_subsets(p, gamma, n)
the number of covariates
the fraction of the sample size to sample (e.g., gamma = 1
means sample n
subsets)
the sample size
a list, with elements Z (the matrix encoding presence/absence of each feature in the uniquely sampled subsets), S (the list of unique sampled subsets), W (the matrix of weights), and z_counts (the number of times each subset was sampled)
p <- 10
gamma <- 1
n <- 100
set.seed(100)
subset_lst <- sample_subsets(p, gamma, n)