Bookmark and Share

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]

Re: st: Chi-Square-Test for Homogeneity


From   Maarten Buis <[email protected]>
To   [email protected]
Subject   Re: st: Chi-Square-Test for Homogeneity
Date   Tue, 20 Nov 2012 13:35:09 +0100

On Tue, Nov 20, 2012 at 1:26 PM, "Rita Frühwald" wrote:
> I have 2 different samples. One from the previous year (2011) with about 500 observations. Another one from the current year (2012) with about 1500 observations. I included a binary variable in my data to represent whether the observation was collected in the previous or the current year. In both samples, I have a nominally scaled  varibale that  represents students' field of study (7 categories).
>
> I want to test whether the distribution of this variable (representing the students' field of study) is the same in both samples

Assuming you stored year in a variable named year and field of study
in a variable called field, type in Stata: -tab field year, chi2-. For
more see: -help tabulate twoway-.

-- Maarten

---------------------------------
Maarten L. Buis
WZB
Reichpietschufer 50
10785 Berlin
Germany

http://www.maartenbuis.nl
---------------------------------

*
*   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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index