Announcement

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

  • Identifying patterns in dichotomous variables

    Hi,

    I have a dataset like the example below (except that I have 14 variables achado*_mlc and not just 3, and 101 obserb) in which 'olho' is the identifying variable .

    What I am struggling to do is to find a way to discover the combination of any of these 14 'achado*_mlc' variables - all dichotomous, that better predicts 'chave' having as 'PCV' as answer (chave is also dichotomous). I would really appreciate some suggestions and how to implement them on Stata. I am using Stata 13.0 for Win 64-bit.

    Thank you in advance for your help.
    Best
    Miguel

    dataset example:
    olho achado1_mlc achado3_mlc achado5_mlc chave
    1 1 1 1 PCV
    2 0 0 0 No PCV
    3 0 0 0 No PCV
    4 1 1 1 PCV
    5 1 1 1 PCV
    6 1 1 1 PCV
    7 0 0 0 No PCV
    8 0 0 0 No PCV
    9 0 0 0 No PCV
    10 1 1 0 PCV
    11 0 0 0 No PCV
    12 1 0 1 PCV
    13 1 1 0 No PCV
    14 1 1 1 PCV
    15 0 0 0 No PCV
    16 1 0 0 PCV
    17 0 0 0 No PCV
    18 0 0 0 No PCV
    19 0 0 0 No PCV
    20 0 0 1 PCV
    Sorry for the very poor formatting. I tried to fix it. unsuccessfully
    Last edited by Miguel Costa; 15 Jun 2015, 17:21. Reason: formatting attempt

  • #2
    Miguel:
    probably the first step you may want to take is taking a look at -egen- and see how to combine all the -achado*- in a single variable (let's call it -Combine-):
    Code:
    egen Combine=rowtotal( achado*)
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3

      Carlo's suggestion is a good start. Assuming that chave is a binary 0/1 variable with value labels, the groups command is useful to look patterns. Find it on SSC:
      Code:
      ssc install groups
      groups achado* chave
      You could also:
      Code:
      logistic chave achado*

      Comment


      • #4
        Thank you for your very useful suggestions!

        Kind regards
        Miguel

        Comment

        Working...
        X