Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Chi2 test on weighted data

From   "Dr. Annelies Blom" <>
To   "" <>
Subject   Re: st: Chi2 test on weighted data
Date   Thu, 20 Sep 2012 14:38:04 +0200 (CEST)

Dear Steve, dear all,

Thank you very much for your answer. I was aware of the svy commands. However,
the command does not support the chi2 option. When I estimate the table without
the chi2 option, I do get a chi2 estimate, however, according to the output this
estimate is "uncorrected". I assume that this means that the weightt is not
taken into account, right?
Stata does calculate a " Design-based  F", however, for this project I need the

The output for the tests looks as follows:
    Uncorrected   chi2(4)         =    7.5233
    Design-based  F(3.97, 18286.26)=    1.5275    P = 0.1916

Does anyone know whether I am just misinterpreting the output or how to get
Stata to deliver weighted chi2 estimates?


Date: Mon, 10 Sep 2012 17:32:27 -0400
From: Steve Samuels <>
Subject: Re: st: Chi2 test on weighted data

Hello, Annelies. Welcome to Statalist!

The command you are seeking is "svy tabulate", and you might have found
it by typing "help survey tabulate". For valid test results, you must first
specify the survey design with -svyset-.  Typing "help survey" will introduce
Stata's survey capabilities. There are a number of contributed survey commands,
so ask
if you need functionality that the built-in commands do not provide.


On Sep 10, 2012, at 2:00 PM, Prof. Annelies Blom wrote:

Dear all,

I have a quick question which I just don't seem to be able to solve.

I would like to perform a chi2 test on whether two categorical variable are
related. My data are survey data and contain a design weight. Thus, I gathered
that I should use pweights. However, I cannot find any command that lets me
perform a chi2 test on pweighted data.

For example: tabulate does not allow the pweight option and, moreover, does only
allow frequency weights in combination with the chi2 analysis.

What am I missing?

*   For searches and help try:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index