Description Usage Arguments Details Value References Examples
This function takes as input any data frame that you want to stratify into clusters. Typically, the goal of such stratification is sampling for generalizability. This function, and the others in this package, are designed to mimic the website https://www.thegeneralizer.org/.
1 |
data |
The R object containing your population data frame |
guided |
logical; defaults to TRUE. Whether the function should be guided (ask questions and behave interactively throughout) or not. If set to FALSE, must provide values for other arguments below |
n_strata |
defaults to NULL. If guided is set to FALSE, must provide a number of strata to cluster population into |
variables |
defaults to NULL. If guided is set to FALSE, must provide a character vector of the names of stratifying variables (from population data frame) |
idnum |
defaults to NULL. If guided is set to FALSE, must provide a character vector of the name of the ID variable (from population data frame) |
The list contains 11 components: x2
, solution
, n_strata
, recruitment_lists
, population_summary_stats2
, summary_stats
, summary_stats2
, heat_data
, heat_plot_final
, idnum
, and variables
.
x2
: a tibble with number of rows equal to the number of rows in the inference population (data
) and number of columns equal to the number of stratifying variables (dummy-coded if applicable) plus the ID column (idnum
) and a column representing stratum membership, clusterID
The function returns a list of class "generalizer_output" that can be provided as input to recruit()
. More information on the components of this list can be found above under "Details."
Tipton, E. (2014). Stratified sampling using cluster analysis: A sample selection strategy for improved generalizations from experiments. Evaluation Review, 37(2), 109-139.
Tipton, E. (2014). How generalizable is your experiment? An index for comparing experimental samples and populations. Journal of Educational and Behavioral Statistics, 39(6), 478-501.
1 2 3 4 5 6 7 8 9 10 11 12 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.