Learn R Programming

CDsampling (version 0.1.6)

approxtoexact_func: Convert the approximate allocation (proportion) to exact allocation (integer) without constraint

Description

Convert the approximate allocation (proportion) to exact allocation (integer) without constraint

Usage

approxtoexact_func(n, w)

Value

allocation is the exact allocation or integer value of the number of subjects sampled from the group

Arguments

n

Sample size, must be a positive integer

w

Approximate allocation/proportion, must be a real-valued vector, can get from running liftone_constrained_GLM or liftone_constrained_MLM

Examples

Run this code
exact_design = approxtoexact_func(n=600, w=c(0.2593526, 0.0000000, 0.0000000,
0.1565024, 0.2891565, 0.0000000, 0.0000000, 0.2949885))


Run the code above in your browser using DataLab