Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Repost: svy with weights and mata run-time error r(3499)


From   Renuka Metcalfe <rm18203@yahoo.co.uk>
To   statalist@hsphsun2.harvard.edu
Subject   Repost: svy with weights and mata run-time error r(3499)
Date   Thu, 13 Sep 2007 12:11:27 +0100 (BST)

Dear Statalisters

I want to run an OLS employing weights given by the
data providers to account for its statified sample
design. They suggest issuing the following

.gen wpstr04=cell_no if cell_no<=17
(1945 missing values generated)

. replace wpstr04=(cell_no+1) if cell_no>=18
(1945 real changes made)

. recode wpstr04 (11/12=13) (17=16) (19/21=22)
(25/26=27) (36=35) (37=38) (40=41) (44=43) (59=60)
 (64=65) (82=83) (107=108)
(wpstr04: 154 changes made)


. svyset [pweight=empwtnr], strata(wpstr04)
vce(linearized)

      pweight: empwtnr
          VCE: linearized
     Strata 1: wpstr04
         SU 1: <observations>
        FPC 1: <zero>

where empwtnr=employment weight 

Then I run 

svy: regress y1 x1 x2 x3 (running regress on
estimation sample)

This is what I get

Mata run-time error
r(3499);

I would be grateful if anyone would let me know how
one can rectify the above error message and run the
regression. 

Many thanks




      ___________________________________________________________
Yahoo! Answers - Got a question? Someone out there knows the answer. Try it
now.
http://uk.answers.yahoo.com/ 
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index