Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Re: Creating a column from point estimates across observations


From   "Sohini Sahu" <[email protected]>
To   [email protected]
Subject   st: Re: Creating a column from point estimates across observations
Date   Sat, 6 Jun 2009 15:51:12 -0400 (EDT)

Thank you Martin.

I was trying out the Statsby command using the following dummy dataset. I
am using version 8 of STATA.

    +------------------------------+
     | cid   score    iq   nutrit~n |
     |------------------------------|
  1. |  C1     100   210        200 |
  2. |  C1      90   190        180 |
  3. |  C2      88   186        150 |
  4. |  C2      80   200        210 |
  5. |  C3      99   180        199 |
     |------------------------------|
  6. |  C3      90   188        211 |
  7. |  C1      30   190        201 |
  8. |  C1      80   180        190 |
  9. |  C2      60   155        176 |
 10. |  C2      50   145        145 |
     |------------------------------|
 11. |  C3      70   198        134 |
 12. |  C3      90   188        122 |
     +------------------------------+

I saved the above in a file.
Then I gave the command
statsby "regress score iq nutrition " _b, by(cid)

I get this
command:      regress score iq nutrition
statistics:   b_iq       = _b[iq]
              b_nutrit~n = _b[nutrition]
              b_cons     = _b[_cons]
by:           cid

The data editor has 4 columns now: cid, b_iq, b_nutrit~n and    b_cons but
the cells are all empty! Any idea where I am going wrong?

S
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index