Announcement

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

  • Using collapse in combination with complex survey design (svyset)

    Dear all,

    is there any way to make the "collapse" command useable in combination with "svyset"? I know collapse is gererally not supported by svyset, but maybe someone out there might know any userwritten program to make it possible.

    What I would like to do is simple descriptive tables considering the complex survey design (and then export these tables to excel). The code could look like that:

    svyset id [pw=weight], stata(x) fpc(y) || id2

    svy: collapse (mean) var1 (semean) var1 (median) var2 (sd) var2, by(var3)

    export excel using "file.xlsx".


    If someone knows a way to do that, I would love to know how. It would make it so much easier for me and my colleagues to generate hundreds of tables in a convenient way (instead of working with the matrix and putexcel command).

    Many thanks in advance.

    Best,
    Julian
Working...
X