Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Sorting/Limiting One-way table Survey Data

    Hi,

    I don't know if this is possible but any help would be appreciated.

    I am using HCUP database to perform some analysis. Due to weighting of the data I am using survey commands.

    I'm generating a one-way table of variable1 if variable2 (dummy variable)==1. This lists all of the possible variable1, is there any way to arrange them in descending order? or preferably only show the top 25?


    Before when I was working with the unweighted data I used
    groups variable1 if variable2==1, ord(h) select (25)
    which worked perfectly.

    The same doesn't work for the weighted data as I have to use survey commands I believe. Is there any way I can do this? (my inelegant solution so far has been to only keep observations where variable1 is equal to one of the top 25 results from the above output).
    I'm doing this currently:
    svy linearized, subpop(variable 2) : tabulate variable1 if variable2==1, cell se ci obs format(%10.5g) which does give me the output. If there is a way I would aappreciate it.
Working...
X