Announcement

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

  • Describe variables

    I have a dataset (example below) and I would like to know the frequency of males (sex==1) and females (sex==0) that mentioned (resinsulted3_3 ==1) and not mentioned (resinsulted3_3 ==0) the variable resinsulted3_3.
    Many thanks in advance
    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input long pidp byte(sex resinsulted3_3)
     68043527 1 0
     68344767 2 0
     68395767 1 0
     68395771 2 0
     68467847 2 0
     68990767 2 0
     69307651 1 0
     69443647 1 1
     69593251 1 0
     69734695 1 0
     69848927 2 1
     69848931 1 0
     69931887 2 0
     70435091 2 0
    137668727 2 0
    137675535 1 0
    138035931 1 1
    138292287 2 0
    204551495 2 0
    204551499 1 1
    205473571 1 0
    205566727 1 1
    205722447 2 1
    205857091 1 0
    205995807 1 0
    206348055 2 0
    272116287 2 1
    272159131 1 1
    272395771 1 0
    273058775 1 0
    273729247 1 0
    273973371 2 0
    274289571 1 0
    340490971 1 0
    341507567 1 1
    341636091 1 0
    341678935 2 0
    341895167 1 1
    341901971 1 1
    342167847 1 0
    346745684 1 0
    408627647 2 0
    408983291 1 0
    409210407 2 0
    409330767 2 0
    409447727 1 1
    409962499 2 0
    410297047 1 0
    410339207 2 0
    410339223 1 0
    410355527 1 0
    410454807 2 0
    416520484 2 1
    476163891 2 0
    476351567 2 0
    477203615 1 0
    477457927 1 0
    477703411 2 1
    477945499 1 1
    478246051 2 0
    478263727 1 0
    478468407 1 0
    478513291 1 0
    545284535 2 0
    545702047 2 1
    545714287 2 0
    545789087 1 0
    545795903 2 0
    546102567 2 0
    546226327 2 1
    546445295 1 1
    546720687 2 0
    546764207 2 0
    612737127 2 0
    613139007 2 0
    613487171 1 1
    613516407 2 1
    613518455 1 0
    613555167 2 0
    613878167 2 0
    614307251 2 0
    680962211 2 0
    681007099 2 0
    681717687 1 1
    681959767 1 1
    687758964 1 0
    748383527 2 0
    748565087 1 1
    749221971 1 0
    749427331 1 1
    749433451 1 1
    749436167 1 1
    749776171 1 1
    750230407 2 0
    816190411 2 0
    816391011 2 0
    817014571 1 0
    817370211 1 0
    817714967 2 0
    817917607 1 0
    end
    label values sex c_sex
    label def c_sex 1 "male", modify
    label def c_sex 2 "female", modify
    label values resinsulted3_3 c_resinsulted3_3
    label def c_resinsulted3_3 0 "not mentioned", modify
    label def c_resinsulted3_3 1 "mentioned", modify

  • #2
    Code:
    tab sex resinsulted3_3

    Comment

    Working...
    X