Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: Using weights with tabulate command

From   "Nick Cox" <>
To   <>
Subject   st: RE: Using weights with tabulate command
Date   Thu, 18 Mar 2004 16:11:10 -0000

With -tabulate-, weights are assumed to be frequency 
weights unless otherwise indicated. Your weights 
sound like analytic weights. 

. by country: tab illness [aw=weight01] 

With -summarize- weights are assumed to be analytic
weights unless otherwise indicated. 


A Castelli
> Sent: 18 March 2004 15:57
> I have a very simple query. I am doing very simple statistics 
> using the
> 'tabulate' command. I have to use a weight to adjust for unit
> nonresponse and to sample up my data to match population totals.
> My data include a variable for country (England, Scotland and 
> Wales), so
> what I am interested in is in sorting my data by country and then use
> the tab command to get the frequency to any other variable for each
> single country. 
> I need now to weight my data, weight is provided by the survey. The
> weight looks like '1734.61'. It has been told to me by ONS 
> (UK) that it
> represents roughly the number of households with a certain type of
> characteristics. I am using individual data, hence individual within a
> household have all be assigned the same weight.
> I do the following:
> .- sort by country
> .- by country: tab illness (one of my variables) [w=weight01]
> I get in return the following error message
> -> country = england
> (frequency weights assumed)
> may not use noninteger frequency weights
> r(401);
> This error message appears only when I use the tab command 
> and not with
> say the sum command.

*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index