Learn R Programming

humanleague (version 2.3.1)

qisi: QIS-IPF

Description

C++ QIS-IPF implementation

Usage

qisi(seed, indices, marginals, skips = 0L)

Value

an object containing:

  • a flag indicating if the solution converged

  • the population matrix

  • the exepected state occupancy matrix

  • the total population

  • chi-square and p-value

Arguments

seed

an n-dimensional array of seed values

indices

a List of 1-d arrays specifying the dimension indices of each marginal

marginals

a List of arrays containing marginal data. The sum of elements in each array must be identical

skips

(optional, default 0) number of Sobol points to skip before sampling

Examples

Run this code
ageByGender = array(c(1,2,5,3,4,3,4,5,1,2), dim=c(5,2))
ethnicityByGender = array(c(4,6,5,6,4,5), dim=c(3,2))
seed = array(rep(1,30), dim=c(5,2,3))
result = qisi(seed, list(c(1,2), c(3,2)), list(ageByGender, ethnicityByGender))

Run the code above in your browser using DataLab