Announcement

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

  • Limit Number of Observations

    Trying to limit the number of observations to the first 2000 and then run a regression. Please help with correct commands.

  • #2
    the way you stated it (which is probably not really what you want to do) calls for something like:
    Code:
    drop if _n>2000
    but you probably just want to exclude these for a particular analysis rather than from the data set so use the "in" operator as in:
    Code:
    sysuse auto
    regress price mpg in 1/25
    but, of course, substitute 2000 where I have written 25; see
    Code:
    h in

    Comment


    • #3
      thanks Rich!!!!!

      Comment

      Working...
      X