Re: Tab2 using survey weights [message #11163 is a reply to message #10567] |
Fri, 11 November 2016 10:17 ![Go to previous message Go to previous message](/theme/default/images/up.png) |
Bridgette-DHS
Messages: 3151 Registered: February 2013
|
Senior Member |
|
|
Following is a response from Senior DHS Stata Specialist, Tom Pullum:
Quote:You can do something that is equivalent to a chi square test. Say you have two categorical variables y and x. First, ignore svy and do the following two commands: "tab y x, all" and "mlogit y x". Compare the maximum likelihood chi square (not Pearson) from the first command with the chi square (you only get the maximum likelihood chi square). You will see that they are the same. The value, the df, and the p values will be the same. If in either command you reverse the y and the x, the results will be the same.
You cannot use svyset and tab to get a chi square but you CAN use svyset with mlogit. Do "svyset: mlogit y x". This time you will not get a chi-square but you will get an F. The p value for the F would be the same as what a p value for a chi-square would be. This is a way to test the null hypothesis that y and x are independent with the svy adjustments. Again, you get the same results if you reverse y and x. If either y or x happens to be binary, then you can use "svyset: logit y x" if, say, it is y that has two values, rather than mlogit. (For logit, the values must be coded 0 and 1; for mlogit they could be 1 and 2.)
If you do this, you don't get a chi-square, but you do get a test statistics for the null hypothesis of independence (or homogeneity) and a p-value, which should be all you really want.
|
|
|