Learn R Programming

CDsampling (version 0.1.6)

bounded_uniform: Find (constrained) uniform exact allocation of the study for bounded design

Description

Find (constrained) uniform exact allocation of the study for bounded design

Usage

bounded_uniform(Ni, nsample, label = NULL)

Value

n is the constrained/unconstrained uniform exact allocation

Arguments

Ni

a vector with size m, upper bound for exact design of each category/stratification group, if unconstrained, use Inf vector, the function will return unbounded uniform allocation

nsample

a number, the sample size

label

A vector of text strings for subgroups' names, default value NULL

Examples

Run this code

bounded_uniform(Ni=c(50, 40, 10, 200, 150, 50), nsample=200)

Run the code above in your browser using DataLab