Learn R Programming

cmm (version 1.0)

Margins: Margins

Description

Provides the required margins for selected variables

Usage

Margins(var, k)

Value

list

Arguments

var

vector indicating the variables

k

vector indicating the required margin: 0 = the total, 1 = first margin, 2 = second margin, etc.

Author

L. A. van der Ark L.A.vanderArk@uva.nl

Details

Particularly useful if for a large number of variables the same margins are required. The output can be used as argument for functions MarginalMatrix, DesignMatrix, and ConstraintMatrix

See Also

ConstraintMatrix, MarginalMatrix, RecordsToFrequencies

Examples

Run this code
Margins(c(1, 2, 3, 4, 5), c(0, 1, 2)) # total, 1st, and 2nd margin for variables 1,.., 5

Run the code above in your browser using DataLab