View source: R/sample_subsets.R
sample_subsets | R Documentation |
Creates the Z and W matrices and a list of sampled subsets, S, for SPVIM estimation.
sample_subsets(p, gamma, n)
p |
the number of covariates |
gamma |
the fraction of the sample size to sample (e.g., |
n |
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.