generate_pop_strat: Generate stratified population from mixture of normal...

Description Usage Arguments Value Examples

View source: R/ssrs.R

Description

Generate stratified population containing healthy and diseased subpopulation generated from normal distributions

Usage

1
2
3
4
5
6
7
8
9
generate_pop_strat(
  N,
  freq_strata,
  mean0_strat,
  mean1_strat,
  sigma0_strat,
  sigma1_strat,
  p1
)

Arguments

N

total size of population

freq_strata

numeric vector containing frequency of strata

mean0_strat

numeric vector of mean for class label 0 (healthy) for all strata

mean1_strat

numeric vector of mean for class label 1 (diseased) for all strata

sigma0_strat

numeric vector of standard deviation for class label 0 (healthy) for all strata

sigma1_strat

numeric vector of standard deviation for class label 1 (diseased) for all strata

p1

proportion of diseased observations in the population

Value

Dataframe containing

Examples

1
2
3
4
5
6
7
generate_pop_strat(N = 1000,
                   freq_strata = rep(.25, 4),
                   mean0_strat = rep(0, 4),
                   mean1_strat = 1:4,
                   sigma0_strat = rep(1, 4),
                   sigma1_strat = rep(1, 4),
                   p1 = .25)

tamytsujimoto/surveyROC documentation built on Sept. 8, 2021, 11:35 p.m.