Announcement

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

  • Collect Layout: Prevent Specific Variables from Output

    I am just starting to use Tables. I merely want to exclude any factor variables from being included in the output.

    This is what I have:

    use "../Data/Working Files/ACS Gravity Model Working Data", clear
    collect clear
    collect create BasicModels
    collect _r_b _r_se, ///
    name(BasicModels) ///
    tag(model[(1)]): ///
    poisson mig_ij i.state_i i.state_j pop_i pop_j dist_ij adjacent amenities_i amenities_j un_i un_j incwage_i incwage_j
    collect _r_b _r_se, ///
    name(BasicModels) ///
    tag(model[(2)]): ///
    poisson mig_ij i.state_i i.state_j pop_i pop_j dist_ij adjacent amenities_i amenities_j un_i un_j incwage_i incwage_j prolife_i prolife_j
    collect _r_b _r_se, ///
    name(BasicModels) ///
    tag(model[(3)]): ///
    poisson mig_ij i.state_i i.state_j pop_i pop_j dist_ij adjacent amenities_i amenities_j un_i un_j incwage_i incwage_j prolife_i prolife_j overall_i overall_j
    collect layout (colname) (model#result[_r_b _r_p]), name(BasicModels)

  • #2
    collect layout allows you to specify the levels of colname that you want to show in your table.
    Using the above example, I'll specify the first 2.
    Code:
    collect layout (colname[pop_i pop_j ]) (model#result[_r_b _r_p]), name(BasicModels)
    Instead of respecifying your layout, you can use collect style autolevels to select which levels to show in the table.
    Code:
    collect style autolevels colname pop_i pop_j
    collect preview

    Comment

    Working...
    X