stratifier: Stratify a population data frame.

Description Usage Arguments Details Value See Also Examples

View source: R/stratifier.R

Description

This function is designed to receive a data frame containing information about an inference population.

Usage

1
2
stratifier(x, metric = "gower", clusters = NULL, autosave = TRUE,
  guided = TRUE, idnum = NULL)

Arguments

x

A data frame containing information about schools in your inference population. Must contain a column of ID numbers identifying each school, along with columns of stratifying variables.

metric

A character string specifying the metric to be used in calculating distances for observations. The default is gower; other options are euclidean and manhattan.

Details

...

To complete the generalization process, the user should run this function on their desired inference population data frame and save the output to an object. The resulting object, referred to as solution in the package documentation, should then be provided as input to the mean_table() and schools_table() functions.

Value

A list. The first element contains the raw results of stratifying the data into the user-selected number of clusters. The second element contains several lists, each ranking the observations within clusters.

See Also

http://thegeneralizer.org/, also add other resources

Examples

1
2
3
4
## Not run: 
stratifier(x)

## End(Not run)

Generalizer/thegeneralizer documentation built on July 10, 2020, 3:53 p.m.