Announcement

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

  • Collapsing missing vars

    I have been trying to use a foreach loop and firstnm with collapse to get this seemingly simple issue resolved, but am having trouble. I just want to collapse this all to one row and get rid of all the missings.

    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input float(writing_practice math_foundations science_101 healthy_living comp_all)
    4363     .    .     .    .
       . 11208    .     .    .
       .     .    .     .    .
       .     .    .     .    .
       .     . 4050     .    .
       .     .    . 11298 9111
       3354     .    .     .    .
    end

  • #2
    Perhaps

    Code:
    collapse _all
    will provide the result you wish. Since the first variable has two values, you'll get the mean of both.
    Best regards,

    Marcos

    Comment

    Working...
    X