Announcement

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

  • extracting numbers from mcc paired table

    Hi there

    Does anyone know how to extract numbers from a paired table after using the -mcc- command?

    -matcell- works after -tab-
    Code:
    clear
    webuse lowbirth.dta
    keep pairid low smoke
    reshape wide smoke , i(pairid) j(low)
    tab2 smoke1 smoke0, matcell(x)
    display x[1,1]
    ...but doesn't work after -mcc-
    Code:
    clear
    webuse lowbirth.dta
    keep pairid low smoke
    reshape wide smoke , i(pairid) j(low)
    mcc smoke1 smoke0, matcell(x)
    display x[1,1]
    With thanks

  • #2
    Unfortunately, I don't think you can do this with -mcc-. -mcc- returns the various risk differences, odds ratios, etc., in r(), and you could capture those numbers from there. But the actual counts in the cells apparently are not stored anywhere after -mcc-. So if you are trying to do both, I think you are reduced to a two-step process: get the cell counts with -tab, matcell()- and the measures of association from -r()- after -mcc- If you don't want the same table cluttering up your output log twice, just suppress the output of -tab- with -quietly-.

    Comment

    Working...
    X