I am using Stata 17 (ver.10May2022). I found that svy: tabulate doesn't seem to work properly, if either the row variable or the column variable contains the extended missing value .z. For example:
Code:
clear all
set obs 10
generate w =1
generate x =rbinomial(3, .5)
replace x =.z if _n==1
replace x =.y if _n==2
 
quietly svyset [pw=w]
 
svy: tabulate x, missing
 
Number of strata =  1       Number of obs   = 10
Number of PSUs   = 10       Population size = 10
                            Design df       =  9
----------------------
        x | proportion
----------+-----------
        0 |         .1
        1 |         .2
        2 |         .5
       .y |         .1
          |
    Total |         .1
----------------------
Key: proportion = Cell proportionThanks for any help on this.
Cheers,
Kirin
No comments:
Post a Comment