Announcement

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

  • Putexcel with bysort() command

    Hi all,

    I have a large set of categorical data that I need moved to excel. I also need to sort the data by specific criteria - whether a state has adopted a certain policy - which I'll call var1. For each var2, var3, ... , var n, I want to write something similar to

    Code:
    bysort var1: tab var2 [aw = weight]
    Because the data are categorical, I'm not interested in mean, sd, etc., only the number and proportion of responses for each category. But when I write

    Code:
    putexcel A1 = bysort var1: tab var2 [aw = weight]
    the console tells me "weights not allowed." If I add parentheses and write

    Code:
    putexcel A1 = (bysort var1: tab var2 [aw = weight])
    the console says "bysort not found."

    Any idea what's going on here?

  • #2
    putexcel supports many syntaxes, but not this one, which you want to be


    putexcel A1 = apply a command, and then put the results here.

    It's mostly a command for details, focused on put this particular result in this particular place.


    Cross-posted at https://stackoverflow.com/questions/...bysort-command

    Comment

    Working...
    X