Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: How to make a contingency table and chi-square test?
From
李 梦佳 <[email protected]>
To
[email protected]
Subject
st: How to make a contingency table and chi-square test?
Date
Sun, 14 Apr 2013 15:03:59 +0800
Dear statalist,
How to make a contingency table of my following panel data and report the chi-square value?
fund code female institute individual time
----------------+-------------------------------------------------------
000001.OF 0 0.234 0.766 200506
000002.OF 1 0.201 0.799 200506
⋯⋯
000001.OF 0 0.283 0.717 201012
000002.OF 1 0.256 0.744 201012
I wish to make a contingency table like the following and test whether females attracts more individual investors than institute investors, as well as whether females attract more institute/individual investors than males.
Male Female
----------------+----------------------------
institute f1 f2
individual f3 f4
(Basically, f1+f2+f3+f4=1. I just wish to test whether f1=f2, f1=f3, f3=f4, f2=f4 at the same time using chi-square)
I tried the following codes but failed:
. tabulate institute individual
too many values
r(134);
. tab institute individual, ch
too many values
r(134);
. symmetry institute female
too many values
r(134);
. symmetry institute female, exact
too many values
r(134);
. symmetry institute female, contrib
too many values
r(134);
Could anyone kindly enlighten me how to do this?
Many thanks,
Mengjia
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/