Announcement

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

  • Generating standard deviation without egen command

    Hello everyone,

    I am doing an event study for my MSc thesis and i need to compute a standard deviation using a specific formula (not the egen = sd (..))
    the formula is the following
    Click image for larger version

Name:	Screen Shot 2018-05-03 at 11.47.17.png
Views:	1
Size:	12.2 KB
ID:	1442612

    How can i compute this standard deviation without the egen command?
    Additionally, this variable will have to be computed on a subset of values but later on i'll have to apply it to another subset so my question is how to do this? how can i copy the values i computed on a subset into another subset of values?

    Thank you in advance for your help.

    Agnese

  • #2
    You don't define any notation here but this looks like a residual variance (so when rooted RMSE) from a moving regression. I can make guesses about what might help, but it's better that you define the real problem much more precisely.

    Comment


    • #3
      To expand on Nick's comment, you'll increase your chances of a useful answer by following the FAQ on asking questions - provide Stata code in code delimiters, readable Stata output (fixed spacing fonts help), and sample data using dataex. . And, avoid pictures and attached files -we can't do much with them.

      If this is just the residual variance from a regression, then it is easy to do, but to help you restrict the regression to a subset of the data and then apply it to another subset etc., we need to know more about your data structure and exactly what you're trying to do.

      Comment

      Working...
      X