Learn R Programming

humanleague (version 2.0.2)

synthPop: [Legacy] Generate a population in n dimensions given n 1-d marginals.

Description

Using Quasirandom Integer Without-replacement Sampling (QIWS), this function generates an n-dimensional population table where elements sum to the input marginals, and supplemental data. The scope of this function is rather limited (qis is more general), but it is fast.

Usage

synthPop(marginals)

Arguments

marginals

a List of n integer vectors containing marginal data (2 <= n <= 12). The sum of elements in each vector must be identical

Value

an object containing: the population matrix, the occupancy probability matrix, a convergence flag, the chi-squared statistic, p-value, and error value (nonzero if not converged)

Examples

Run this code
# NOT RUN {
synthPop(list(c(1,2,3,4), c(3,4,3)))
# }

Run the code above in your browser using DataLab