assess_wrap: Assess the Generalizability of a Sample to a Population

Description Usage Arguments Details

View source: R/assess_wrap.R

Description

This function is a wrapper for the function 'assess()' which may make assessment more user-friendly and flexible.

Usage

1
assess_wrap(sample, population, join_var = NULL, grouping_var = NULL)

Arguments

sample

a data frame with a column of IDs

population

a data frame with a column of IDs, columns for any stratifying variables of interest, and (if applicable) a grouping variable

join_var

defaults to NULL; name of the ID variable in double quotes

grouping_var

defaults to NULL; name of a grouping variable in double quotes (not required)

Details

Given a data frame or tibble consisting of a column of some ID variable (the sample) and a data frame or tibble of the same ID variable and stratifying variables of interest, this function will assess the generalizability of the sample to the population.

The user can also specify a grouping variable to assess the generalizability of their sample across population groups – for example, across US states. This will produce multiple generalizability index values, one per level of the grouping variable.


katiecoburn/generalizeR documentation built on Oct. 28, 2020, 4:43 a.m.