powered by
Provides the required margins for selected variables
Margins(var, k)
list
vector indicating the variables
vector indicating the required margin: 0 = the total, 1 = first margin, 2 = second margin, etc.
L. A. van der Ark L.A.vanderArk@uva.nl
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
MarginalMatrix
DesignMatrix
ConstraintMatrix
ConstraintMatrix, MarginalMatrix, RecordsToFrequencies
RecordsToFrequencies
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