Announcement

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

  • Weighted t test

    Is it possible to ttest a variable weighted by another variable in the dataset? So, to ttest the weighted average. The variable that I want to be tested are several stock betas (variable created by regressions) that have to be weighted by market values (each stock beta has a corresponding stock market value). I read somewhere that it is possible to set it up as a regression problem, but I am not sure how to.


  • #2
    as you say, this can be done via - regress-; so, the following two results are the same:
    Code:
    sysuse auto
    ttest price, by(foreign)
    regress price i.foreign
    -regress- allows the use of any kind of weight; see
    Code:
    help regress
    I believe, but could be wrong, that you want a two-sample test; if you want a one-sample test, there is a regression for that also

    Comment

    Working...
    X