create.Z.ZF {cta}R Documentation

Population Matrix and Sampling Constraint Matrix

Description

Creates the population (aka strata) matrix Z and the sampling constraint matrix Z_{F} using strata and sampling constraint information found in input variables strata and fixed.strata.

Usage

create.Z.ZF(strata, nrowZ = length(strata), fixed.strata = "all")

Arguments

strata

The vector that gives the stratum membership identifier.

nrowZ

Number of rows of the to-be-created population (aka strata) matrix Z.

fixed.strata

The object that gives information on which stratum have fixed sample sizes. It can equal one of the keywords, fixed.strata = "all" or fixed.strata = "none", or it can be a vector of stratum membership identifiers, e.g. fixed.strata = c(1,3). Default: fixed.strata = "all".

Value

create.Z.ZF returns a list, which includes the following two objects:

Z

Population (aka strata) matrix.

ZF

Sampling constraint matrix.

Author(s)

Joseph B. Lang

References

Lang, J. B. (2004) Multinomial-Poisson homogeneous models for contingency tables, Annals of Statistics, 32, 340–383.

See Also

mph.fit

Examples

create.Z.ZF(c(1, 1, 2, 3, 3), fixed.strata = "all")
create.Z.ZF(c(1, 1, 2, 3, 3), fixed.strata = "none")
create.Z.ZF(c(1, 1, 2, 3, 3), fixed.strata = c(1, 2))

[Package cta version 1.3.0 Index]