Skip to contents

Calculates the blending factor (alpha) for NPS sample integration. Uses either a naive approach or the Fahimi et al. (2024) method, depending on the naive argument and settings.

Usage

calc_alpha(seed, settings, naive = TRUE)

Arguments

seed

data.table. Survey data with initial_weight column.

settings

list. Must include nps_blending_factor (optional).

naive

logical(1). If TRUE, use naive approach. Default: TRUE.

Value

data.table. Columns: invitation , UWE , n , alpha .

Details

  • If nps_blending_factor is set in settings, returns that value.

  • Otherwise, calculates alpha by:

    1. Computing UWE for each invitation group.

    2. If naive = TRUE, ignores UWE and uses sample sizes only.

    3. If naive = FALSE, uses UWE-adjusted sample sizes per Fahimi et al. (2024).

  • Returns a data.table with alpha per invitation.

Settings

  • nps_blending_factor : Optional, overrides calculated alpha.

See also

Examples

## Not run:
# seed <- ... # survey data with initial_weight
# settings <- list()
# calc_alpha(seed, settings, naive = TRUE)
## End(Not run)