Announcement

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

  • Programming help

    Hi, I was wanting to ask a question re writing a Stata Program.

    I'm trying to do the following;
    Using the nlsw88 data in the system using the wage as a cont variable,

    a. Take a subsample of the data 500 times
    b. Compute the mean and the variance of a given continuous variable from each of the subsample
    c. Compute the grand mean (i.e. overall mean of the means computed from each subsample), and the variance of the mean and the mean of the variance. Now it should add these two variances to compute the grand variance.
    d. In the output return it must present the grand mean and the grand variance. All these steps must be done quietly.

    I am at a terrible loss as to how I should set my var. I've only started getting a hang of the very basics of stata programming but I'm feeling very out of depth.

    Thanks in advance


  • #2
    I don't understand the problem.

    Comment


    • #3
      If you want sampling with replacement see -help bootstrap- including the option saving(). And, if this is a programming exercise you may start by reading Using Stata’s random-number generators, part 3, drawing with replacement

      Comment

      Working...
      X