Announcement

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

  • Introduce limits on the output

    Good morning,
    I would like to impose limits on the final output. When my code terminates, I get a new variable (indexFinal) with several observations (more than 1000). I would like to save only the first 50 observations of this variable in excel (the remaining observations delete them or not save them in excel). Here is an example to be clearer:

    This is the result I get (the entered values ​​are just for example):

    Name var1 var2 var3 ....... indexFinal
    firm1 ...... ...... ...... ............... 100
    firm2 ...... ...... ...... ................ 90
    ....... ...... ...... ...... ...... ..........
    firm1000 ...... ...... ...... ........... 70

    I would like to save only the first 50 observations in Excel.
    Name var1 var2 var3 ....... indexFinal
    firm1 ...... ...... ...... ................. 100
    firm2 ...... ...... ...... .................. 90
    ....... ...... ...... ...... ...... ..........
    firm50 ...... ...... ...... ................. 60

    it is possible to do this in Stata.
    I hope I was clear and I apologize if I have confused the terms or concepts.
    Thank you
    Last edited by Riccardo Busin; 15 Dec 2021, 04:37.

  • #2
    See

    Code:
    help in
    to learn about a basic qualifier. allowed by (for example) export excel

    Comment


    • #3
      Originally posted by Nick Cox View Post
      See

      Code:
      help in
      to learn about a basic qualifier. allowed by (for example) export excel
      Thank you for the help provided. Your suggestions and indications are always useful to me in completing my tasks with Stata. Thanks again.

      Comment

      Working...
      X