Any idea of how to perform chi-square test for contingency table?
303 views
Skip to first unread message
Kel
unread,
Apr 30, 2014, 2:11:28 AM4/30/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
Hello stan users,
I just got to start learning stan recently and I'm just wondering if there is a way to do simple task such as chi-square test for 2x2 contingency table in Stan. In R, it's is fairly easy and straightforward because we can call the function Crosstable and chisq.test() for analyzing contingency table. However, I'm not quite certain what parameters I should estimate and which statistical modeling I will need to use in Stan. What I do want to know from the parameter estimates is that whether or not, say categorical variable X is independent of another category Y.
Thanks.
Example:
Bob Carpenter
unread,
Apr 30, 2014, 2:31:22 PM4/30/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to stan-...@googlegroups.com
Stan isn't set up to do this kind of hypothesis testing.
Having said that, you can set up Bayesian equivalents easily
enough. But you need to think of it in terms of a model and
the kind of posterior inference you want to do. See:
> -Charlie
>
>
>
> --
> You received this message because you are subscribed to the Google Groups "Stan users mailing list" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to stan-users+...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
Charles
unread,
May 1, 2014, 11:06:52 PM5/1/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message