numSampPerStrata: Determine and (randomly) adjust the number of samples per...

View source: R/SOptim_UnsupervisedClassification.R

numSampPerStrataR Documentation

Determine and (randomly) adjust the number of samples per stratum

Description

Allows to calculate the number of samples per stratum with allocation proportional to size

Usage

numSampPerStrata(propStrata, n, minSamp = TRUE, minSizeSet = 10)

Arguments

propStrata

A table object with the proportion of each stratum in terms of area of relative frequency.

n

Total number of samples.

minSamp

Should a minimum sample size per stratum be enforced? (default: TRUE)

minSizeSet

Minimum sample size per stratum (default: 10).

Value

A table object with the number of samples by stratum.

See Also

table

Examples


st <- sample(1:5,1000,replace=TRUE)
tb <- table(st)/length(st)

numSampPerStrata(propStrata=tb, n=100, minSamp = TRUE, minSizeSet = 10)


joaofgoncalves/SegOptim documentation built on Feb. 5, 2024, 11:10 p.m.