Announcement

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

  • T-test with Sample Weight

    Hello,

    I wanted to do a t-test using variables age and doctor-diagnosed asthma (ConDr) accounting also for my sample weight which is int121314.
    I tried the commands ​ttest age, by(ConDr) [aweight=int121314wt] and ttest age, by(ConDr) [pweight=int121314wt] got option [ not allowed.
    Can anyone tell me what would be the accurate command.
    Thank you.

  • #2
    ttest does not allow weights as near as I can tell. Assuming CondDr is coded 0/1, you can set this up as a regression problem like this:

    Code:
    reg age CondDr [pw=int121314wt]
    Richard T. Campbell
    Emeritus Professor of Biostatistics and Sociology
    University of Illinois at Chicago

    Comment


    • #3
      Okay
      Thank you.

      Comment

      Working...
      X