JoinModels: JoinModels

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Returns the simultaneous specification of two models

Usage

1

Arguments

...

list of ‘compatible’ models, i.e., each model is specified using the same number of functions (and matrices)

Details

Models can be of any form allowed in CMM (see MarginalModelFit), eg, list(bt,coeff,at), with the restriction that the number of columns of the at matrices must be equal, and the list of functions in coeff must be identical.

Value

CMM model form

Author(s)

W. P. Bergsma w.p.bergsma@lse.ac.uk

References

Bergsma, W. P. (1997). Marginal models for categorical data. Tilburg, The Netherlands: Tilburg University Press. http://stats.lse.ac.uk/bergsma/pdf/bergsma_phdthesis.pdf

Bergsma, W. P., Croon, M. A., & Hagenaars, J. A. P. (2009). Marginal models for dependent, clustered, and longitudunal categorical data. Berlin: Springer.

See Also

DirectSum, SpecifyCoefficient, MarginalModelFit

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# simultaneously specify marginal independence in two marginal tables

bt1 = ConstraintMatrix(c("A","B"),list(c("A"),c("B")),c(3,3))
at1 = MarginalMatrix(c("A","B","C"),c("A","B"),c(3,3,3))
model1 = list(bt1,"log",at1)

bt2 = ConstraintMatrix(c("B","C"),list(c("B"),c("C")),c(3,3))
at2 = MarginalMatrix(c("A","B","C"),c("B","C"),c(3,3,3))
model2 = list(bt2,"log",at2)

model12 = JoinModels(model1,model2)

# the model can be fitted to an artificial data set
n = c(1:27)
fit=MarginalModelFit(n,model12)

cmm documentation built on May 2, 2019, 3:36 a.m.