[R] formula (joint, conditional independence, etc.) - mosaicplots

g gina.joue at ucd.ie
Fri Jun 13 02:11:33 CEST 2003


Hi,

Can someone set me straight as to how to write formulas in R to indicate:
	complete independence [A][B][C]
	joint independence [AB][C]
	conditional independence [AC][BC]
	nway interaction [AB][AC][BC]
?

For example, if I have 4 factors: 
hair colour, eye colour, age, sex

does 
	>  mosaicplot( frequency ~ hair + eye + age + sex)

mean that the model fitted is of complete independence of all factors 
[hair][eye][age][sex]?

So does 
	> mosaicplot(frequency ~ hair + eye)
mean that the model is of conditional independence
[hairAgeSex][eyeAgeSex]?


How does the operator *  as in
	> mosaicplot( frequency ~ hair * eye)
or
	> mosaicplot( frequency ~ hair * eye + age)
equate to in the type of independence model used?


Thanks in advance for any elucidation!

Gina




More information about the R-help mailing list