Announcement

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

  • margins and loop with different multi-level factor variables

    Hi
    I'm using the following code:
    Code:
    margins, at(x=(0(1)3))
    however, I have multiple categorical variables that some of which take 3 levels, some take 2 levels, and others take 4 levels. I want to do a -foreach- loop to get the margins. however, I can't find a way to do this. I would appreciate any insights. Thanks,

  • #2
    If these are all categorical variables, you do not need to use the -at()- option. There is a simpler syntax, and it lends itself easily to your situation. If your categorical variables are x, y, z, and w:

    Code:
    margins x y z w

    Comment

    Working...
    X