Announcement

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

  • Newbie here in need of assistance.

    Hello. Newbie here.

    Online class has just started and next semester we would have our econometrics subject and it involves using STATA. Last time it was R and I was a bit comfortable with it. I don't know why change softwares now :<. I asked an econometrics teacher if she would give me sample problem sets that I could practice before the next semester starts so that I can have a basic understanding of STATA.

    Now I am stuck in number 7. Label the variable N “Number of observations” and show N.

    I know how to label the variable but I don't understand what show means. Is it display, list or count?

    And for the rest of the numbers I just simply gave up because I still have other things to do. I tried searching and reading about STATA but I just don't understand or I am just demotivated. If anyone could show me how they answer it I would be very grateful.

    I do hope this forum will help me become knowledgeable about STATA and help me progress faster in learning by myself.

    I've posted the picture for the problem set and a link for the caschool.dta file in the google drive. I can send a screenshot of the progress I made in do file editor if anyone is willing to take a look at it and correct me. Anyway, thank you so much.

    https://drive.google.com/drive/folde...km?usp=sharing

  • #2
    https://www.statalist.org/forums/help#adviceextras #4 explains our policy on homework questions, which here includes any assignments for a course or module.

    We've all been students and many of us have been or even remain teachers. There is a consensus here that (a) you are asked not to post homework questions and (b) doing other people's homework is more than we want to support and is not even in your own best long-term interests. Your school also should have rules about plagiarism and collusion.

    I don't want to get into your story about this being a practice problem set ahead of the teaching.

    Comment


    • #3
      Abdul:
      welcome to this forum.
      Please see the FAQ about class/home assignments.
      That said, you may want to try:
      Code:
      . set obs 10
      number of observations (_N) was 0, now 10
      
      . g Number_of_observation=runiform()*10
      
      . tabstat Number_of_observation, stat(count mean sd p50 min max)
      
          variable |         N      mean        sd       p50       min       max
      -------------+------------------------------------------------------------
      Number_of_~n |        10  3.826316  3.003007  3.361198  .2855687  8.759911
      --------------------------------------------------------------------------
      
      .
      As William Lisowski wisely reminded many times on this forum, the best way to get your self familiar with the wonderful Stata capabilities is to take a look at the entries you're interested in Stata .pdf manual.
      Kind regards,
      Carlo
      (Stata 19.0)

      Comment


      • #4
        Welcome to the List. Here are three pieces of advice:

        1. To emphasise Carlo's post, make use of the Stata pdf documentation. Look in the main menu bar "Help" when Stata is running. The pdf documentation is very detailed and, for a new user the places to start are (not surprisingly) "Getting Started" and "User's Guide". For example, see section 12.6 of the User Guide in relation to labels. Also, use the Index in the list of bookmarks of the pdf documentation.
        2. Use the in-built help system: in the Stata command window type help label and you will get a new viewer window with links to information on 'label'.
        3. Make use of web resources. The "Getting Started" pdf gives relevant advice. However, one site (among many) that can be very helpful is hosted by UCLA https://stats.idre.ucla.edu/stata/modules/

        Finally, as you will have read from other posts, Statalist users will rarely, if ever, give direct help on homework assignments; but hints are sometimes ok. I too find the instruction "show N" rather vague but given the context I suggest you look up 'describe'.

        Comment

        Working...
        X