Announcement

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

  • How to write this kind of ttest syntax

    Dear All,

    Thank you sincerely and I run the following program.

    sysuse nlsw88.dta, clear
    tab industry collgrad, sum(wage) means

    stata shows that:

    tab industry collgrad, sum(wage) means

    Means of hourly wage

    | college graduate
    industry | not colle college g | Total
    -----------+----------------------+----------
    Ag/Forest | 5.3122251 7.0626361 | 5.6211211
    Mining | 15.349593 . | 15.349593
    Construct | 6.3992254 17.66774 | 7.5649338
    Manufactu | 6.8861197 13.730761 | 7.5015779
    Transport | 11.195142 13.225958 | 11.443353
    Wholesale | 5.8526317 8.2472956 | 6.1258966
    Finance/I | 9.4961749 11.875596 | 9.8431737
    Business/ | 6.4778803 11.728484 | 7.5157904
    Personal | 4.3603053 5.679114 | 4.4010932
    Entertain | 5.9703888 8.5340567 | 6.7244088
    Professio | 6.2705725 10.093487 | 7.8711858
    Public Ad | 8.2137595 12.039293 | 9.148407
    -----------+----------------------+----------
    Total | 6.9259835 10.543932 | 7.7834633

    .
    end of do-file

    I want to test for a specific industry, whether the salaries between those who attend the universities and those who do not are different or not. For example, for Ag/Forest, the salary of people who do not attend colleges and who do are
    5.3122251 and 7.0626361 respectively. I want to write a ttest command to see whether it has any difference or not.

    How can I write down this syntax?

    Best regards,

    eddie



  • #2
    Well, the two means are obviously different, as you have already established. However,

    Code:
    ttest wage if (industry == 1) , by(collgrad) unequal
    provides no evidence that the difference is statistically significant at any conventional level.

    Best
    Daniel

    Comment

    Working...
    X