dimanche 31 octobre 2021

What means "slowest and quickest varying" in function 'stratified' of R-package 'splitstackshape'?

To generate stratified random samples, I follow this answer on stackoverflow, which uses the stratified function of R-package splitstackshape. In the section about the group argument, the R-documentation of splitstackshape says:

The column or columns that should be used to create the groups. Can be a character vector of column names (recommended) or a numeric vector of column positions. Generally, if you are using more than one variable to create your "strata", you should list them in the order of slowest varying to quickest varying. This can be a vector of names or column indexes.

What does "you should list them in the order of slowest varying to quickest varying" mean? Since the same question asked 2 years ago at github without any answer, it would be great to have an explanation and an example as well!




Aucun commentaire:

Enregistrer un commentaire