adjust_CVs: adjustCVs

adjust_CVsR Documentation

adjustCVs

Description

Function to increase or decrease the precision constraints in order to obtain the desired sample size

Usage

adjust_CVs(target_size, strata, errors, adj_rate = 0.01)

Arguments

target_size

desired sample size.

strata

the 'strata' dataset.

errors

the 'errors' dataset containing the current precision constraints

adj_rate

the rate of adjustment (default=0.01): the smaller, the higher the precision in reaching the target size; the higher, the quicker is the adjustment

Value

the new 'errors' dataset containing the modified precision constraints

Examples

data(beat.example)
errors
a <- beat.1st(strata,errors)
sum(a$alloc$ALLOC[-nrow(a$alloc)])
errors_new <- adjust_CVs(9000,strata,errors,adj_rate=0.005)
errors_new

barcaroli/R2BEAT documentation built on Jan. 9, 2025, 8:09 a.m.