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

Re: st: svymean


From   [email protected] (Jeff Pitblado, Stata Corp.)
To   [email protected]
Subject   Re: st: svymean
Date   Thu, 24 Apr 2003 19:56:46 -0500

Hsu, Lucy <[email protected]> asks about the syntax of -svyset-:

> For V8SE, why sometime it works with separate statements for setting
> up the sampling parameters (method 1) instead of combining all 
> the sampling parameters in one statement (method 2)?  Thanks a lot,

> Method 1:
> svyset  strata  pstrhwr 
> svyset  psu     ppsuhrx 
> svyset  pweight wtper2 
> svymean drvisnx hspstyn erusenx, subpop(sitesamp) obs size deft 

> Method 2:
> svyset  [pweight=wtper2], strata(pstrhwr) psu(ppsuhrx)
> svymean drvisnx hspstyn erusenx, subpop(sitesamp) obs size deft


I'm guessing, but Lucy is probably working with do-files that were written
prior to Stata 8.  These do-files most likely have a -version- statement
somewhere at the top, otherwise they will not run properly in Stata 8.


Method 1 follows the original syntax of the -svyset- command and is only
allowed under version control, see -[P] version- or type the following from
within Stata 8:

	. help version

Method 2 is the new syntax for the -svyset- command, see -[SVY] svyset- or
type the following from with Stata 8:

	. help svyset

The following commands would each generate an error in Stata 8:

	. version 8: svyset strata pstrhwr

	. version 7: svyset [pweight=wtper2], strata(pstrhwr) psu(ppsuhrx)

--Jeff
[email protected]
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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