You are here

contingency tables

4 posts / 0 new
Last post
carey's picture
Offline
Joined: 10/19/2009 - 15:38
contingency tables

am embarrassed to ask this, but a prior post (openmx.psyc.virginia.edu/thread/602) talks of fitting threshold models to contingency tables, but i have been unsuccessful in finding either instructions or an example of how to do this without writing my own functions. any help?
greg

suzannejak's picture
Offline
Joined: 01/06/2010 - 06:17
I am also interested in

I am also interested in fitting models to contingency tables with OpenMx. So I am very curious, did you manage to find any examples?

DavidCross's picture
Offline
Joined: 06/28/2011 - 00:55
Contingency Tables

I would be interested also ...

neale's picture
Offline
Joined: 07/31/2009 - 15:14
Not straightforward

There is no built-in "analyze this" function for contingency tables, but we hear you loud & clear and will look to add one.

In the meantime, it is possible to use a weighted ordinal FIML approach. The data might look like this:
V1 V2 Freq
1 1 22
1 2 15
2 1 13
2 2 37

You could assign Freq as a definition variable and use it to weight the likelihoods. This is akin to the approach taken with a latent class model, except here the frequencies are used to weight the -2ln likelihoods rather than the likelihoods prior to taking the logs and multiplying by -2. The file LCAlazarsfeld-rewrite.R in the repository http://openmx.psyc.virginia.edu/repoview/1/trunk/models/passing/LCAlazarsfeld-rewrite.R does LCA; it is not too bad to change it for the frequency part. An advantage is that one could specify multi-dimensional (m x n x p x ...) contingency tables using this approach, rather than just m x n tables. This may be why we elected not to prioritize a contingency table function.

Log in or register to post comments