Announcement

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

  • Is multiple membership with repeated measures for dyadic data and binary outcome possible?

    Hi,
    I desperately need brains to help me eliminate options here. I have dyads (say, parent-child) that I can follow through at most 7 censuses (1851-1911). Most of the time parents have more than one children, and children can be grouped with each of their parents in several occurrences. Moreover, adults can be both parent and child in different dyads for the same census year. So, individuals can be part of multiple dyads for each census that they are enumerated in. A dyad exists only for a specific year when both individuals are listed in the census. Overall I have more than 2M observations. Sample below.

    My goal: binary outcome (coresidence) but taking into account the fact that individuals may be part of multiple dyads for several occurrences. I want to test for effects of dyads (and compare to other dyads like siblings, gr-parents and gr-children, uncles/nephews, etc.). IVs are simple: gender, marital status, SES, rural-urban, among others. I suspect a potential interest to stratify by gender as women married in their parish, but left to the man's one. Women may live farther then men in average.

    I read about APIM model, SEM, Social relations model, cross-classified models, I enrolled in the LEMMA courses and bought MLWin to try MCMC models, but still facing a mountain of doubts. Can't figure how to model my data but it seems it is a mix of multiple membership with repeated measures for dyadic data. I could also have gone for the long shot and model all the family members at once (a different model I suppose), but I wanted to include extended family members like cousins as well as half siblings (which can be part of more than one family and "family" is not defined here). I read about margins to compare across models (and ease of interpretation) and to get there I was trying to fit this (simplified):

    Code:
    melogit coresid i.ego_sex i.census i.agegrp || dyad:, covariance(unstructured) vce(cluster dyad)
    Results are aggregated, it is difficult to identify which characteristics of either members of the dyads have an effect on the outcome. It may be enough though to compare between types of dyads. But Mr. Schecter suggested the addition of interactions in a previous thread, maybe there is more to extract from the data.

    Any suggestion or model elimination is welcome.

    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input long ego int census byte(ligne2 head kin2 half coresid same_sdistnam same_distnam same_context ego_sex ego_age agediff ego_ses ego_mat ego_context) long(ego_serial dyad) byte kin_lsj float(prop agegrp oldest) byte _est_m1
    1000019 6 3 1 1 0 0 1 0 0 2 18 29 0 1 5 237801   248 0   0  0 0 1
     936904 6 3 1 2 0 0 1 0 0 1 47 29 0 1 5 237802   248 0 .29 20 1 1
    1000019 6 3 1 1 0 0 1 0 0 2 18 23 0 1 5 237801   265 0   0  0 0 1
     976687 6 3 1 2 0 0 1 0 0 2 41 23 0 1 5 237802   265 0 .29 20 1 1
    1000026 6 3 0 1 0 1 0 0 0 1 19 28 0 6 5 237802   539 0 .29  0 0 1
     936904 6 3 1 2 0 1 0 0 0 1 47 28 0 1 5 237802   539 0 .29 20 1 1
    1000026 6 3 0 1 0 1 0 0 0 1 19 22 0 6 5 237802   556 0 .29  0 0 1
     976687 6 3 1 2 0 1 0 0 0 2 41 22 0 1 5 237802   556 0 .29 20 1 1
      28866 6 3 0 1 0 1 0 0 0 2  0 22 0 6 5 237989   675 0   0  0 0 1
    1000027 6 3 1 2 0 1 0 0 0 2 22 22 0 1 5 237989   675 0   0 20 1 1
    1000027 6 3 1 1 0 0 1 0 0 2 22 25 0 1 5 237989   818 0   0 20 0 1
     936904 6 3 1 2 0 0 1 0 0 1 47 25 0 1 5 237802   818 0 .29 20 1 1
    1000027 6 3 1 1 0 0 1 0 0 2 22 19 0 1 5 237989   835 0   0 20 0 1
     976687 6 3 1 2 0 0 1 0 0 2 41 19 0 1 5 237802   835 0 .29 20 1 1
    1000094 6 3 0 1 0 1 0 0 0 1 12 35 0 6 5 237802  2076 0 .29  0 0 1
     936904 6 3 1 2 0 1 0 0 0 1 47 35 0 1 5 237802  2076 0 .29 20 1 1
    1000094 6 3 0 1 0 1 0 0 0 1 12 29 0 6 5 237802  2093 0 .29  0 0 1
     976687 6 3 1 2 0 1 0 0 0 2 41 29 0 1 5 237802  2093 0 .29 20 1 1
    1000095 6 3 0 1 0 1 0 0 0 2  4 43 0 6 5 237802  2343 0 .29  0 0 1
     936904 6 3 1 2 0 1 0 0 0 1 47 43 0 1 5 237802  2343 0 .29 20 1 1
    1000095 6 3 0 1 0 1 0 0 0 2  4 37 0 6 5 237802  2360 0 .29  0 0 1
     976687 6 3 1 2 0 1 0 0 0 2 41 37 0 1 5 237802  2360 0 .29 20 1 1
    1000102 6 3 0 1 0 1 0 0 0 2 14 33 0 6 5 237802  2640 0 .29  0 0 1
     936904 6 3 1 2 0 1 0 0 0 1 47 33 0 1 5 237802  2640 0 .29 20 1 1
    1000102 6 3 0 1 0 1 0 0 0 2 14 27 0 6 5 237802  2657 0 .29  0 0 1
     976687 6 3 1 2 0 1 0 0 0 2 41 27 0 1 5 237802  2657 0 .29 20 1 1
    1000110 6 3 0 1 0 1 0 0 0 2 16 31 0 6 5 237802  2925 0 .29  0 0 1
     936904 6 3 1 2 0 1 0 0 0 1 47 31 0 1 5 237802  2925 0 .29 20 1 1
    1000110 6 3 0 1 0 1 0 0 0 2 16 25 0 6 5 237802  2942 0 .29  0 0 1
     976687 6 3 1 2 0 1 0 0 0 2 41 25 0 1 5 237802  2942 0 .29 20 1 1
    1001254 1 3 0 1 0 1 0 0 0 2  0 23 0 6 2 242426 20815 0   0  0 0 1
    1001308 1 3 1 2 0 1 0 0 0 1 23 23 3 1 2 242426 20815 0   0 20 1 1
    1001254 1 3 0 1 0 1 0 0 0 2  0 19 0 6 2 242426 21116 0   0  0 0 1
     951044 1 3 1 2 0 1 0 0 0 2 19 19 0 1 2 242426 21116 0   0  0 1 1
    1003046 6 3 0 1 0 1 0 0 0 2  3 35 0 6 2 241142 22957 0   0  0 0 1
    1001322 6 3 1 2 0 1 0 0 0 1 38 35 2 1 2 241142 22957 0   0 20 1 1
    1003047 6 3 0 1 0 1 0 0 0 2  0 38 0 6 2 241142 22958 0   0  0 0 1
    1001322 6 3 1 2 0 1 0 0 0 1 38 38 2 1 2 241142 22958 0   0 20 1 1
    1003054 6 3 0 1 0 1 0 0 0 2  4 34 0 6 2 241142 22959 0   0  0 0 1
    1001322 6 3 1 2 0 1 0 0 0 1 38 34 2 1 2 241142 22959 0   0 20 1 1
    1001438 5 3 0 1 0 1 0 0 0 2  5 33 0 6 5 236055 26578 0   0  0 0 1
    1001513 5 3 1 2 0 1 0 0 0 1 38 33 1 1 5 236055 26578 0   0 20 1 1
    1001438 5 3 0 1 0 1 0 0 0 2  5 25 0 6 5 236055 26621 0   0  0 0 1
     934319 5 3 1 2 0 1 0 0 0 2 30 25 0 1 5 236055 26621 0   0 20 1 1
     617778 5 3 0 1 0 1 0 0 0 1  5 28 0 6 4 239033 27259 0 .25  0 0 1
    1001460 5 3 1 2 0 1 0 0 0 2 33 28 0 1 4 239033 27259 0 .25 20 1 1
     617785 5 3 0 1 0 1 0 0 0 1  9 24 0 6 4 239033 27261 0 .25  0 0 1
    1001460 5 3 1 2 0 1 0 0 0 2 33 24 0 1 4 239033 27261 0 .25 20 1 1
     617786 5 3 0 1 0 1 0 0 0 1  4 29 0 6 4 239033 27262 0 .25  0 0 1
    1001460 5 3 1 2 0 1 0 0 0 2 33 29 0 1 4 239033 27262 0 .25 20 1 1
     617793 4 3 0 1 0 1 0 0 0 1  5 18 0 6 4 232847 27264 0   0  0 0 1
    1001460 4 3 1 2 0 1 0 0 0 2 23 18 0 1 4 232847 27264 0   0 20 1 1
     617793 5 3 0 1 0 1 0 0 0 1 15 18 0 6 4 239033 27264 0 .25  0 0 1
    1001460 5 3 1 2 0 1 0 0 0 2 33 18 0 1 4 239033 27264 0 .25 20 1 1
     617847 4 3 0 1 0 1 0 0 0 1  3 20 0 6 4 232847 27266 0   0  0 0 1
    1001460 4 3 1 2 0 1 0 0 0 2 23 20 0 1 4 232847 27266 0   0 20 1 1
     617847 5 3 0 1 0 1 0 0 0 1 13 20 0 6 4 239033 27266 0 .25  0 0 1
    1001460 5 3 1 2 0 1 0 0 0 2 33 20 0 1 4 239033 27266 0 .25 20 1 1
     617862 5 3 0 1 0 1 0 0 0 1  2 31 0 6 4 239033 27269 0 .25  0 0 1
    1001460 5 3 1 2 0 1 0 0 0 2 33 31 0 1 4 239033 27269 0 .25 20 1 1
    1001498 2 3 0 1 0 1 0 0 0 2  6 32 0 6 4 200062 27996 0   0  0 0 1
    5157720 2 3 1 2 0 1 0 0 0 1 38 32 3 1 4 200062 27996 0   0 20 1 1
    1001498 3 3 0 1 0 1 0 0 0 2 16 32 0 6 4 230195 27996 0 .38  0 0 1
    5157720 3 3 1 2 0 1 0 0 0 1 48 32 3 1 4 230195 27996 0 .38 20 1 1
    1001498 4 3 0 1 0 1 0 0 0 2 26 32 0 6 4 231640 27996 0 .25 20 0 1
    5157720 4 3 1 2 0 1 0 0 0 1 58 32 3 1 4 231640 27996 0 .25 50 1 1
    1001498 5 3 0 1 0 1 0 0 0 2 36 33 0 6 4 234254 27996 0   0 20 0 1
    5157720 5 3 0 2 0 1 0 0 0 1 69 33 0 1 4 234254 27996 0   0 50 1 1
    1001498 2 3 0 1 0 1 0 0 0 2  6 34 0 6 4 200062 27997 0   0  0 0 1
    5157721 2 3 1 2 0 1 0 0 0 2 40 34 0 1 4 200062 27997 0   0 20 1 1
    1001498 3 3 0 1 0 1 0 0 0 2 16 33 0 6 4 230195 27997 0 .38  0 0 1
    5157721 3 3 1 2 0 1 0 0 0 2 49 33 0 1 4 230195 27997 0 .38 20 1 1
    1001498 4 3 0 1 0 1 0 0 0 2 26 33 0 6 4 231640 27997 0 .25 20 0 1
    5157721 4 3 1 2 0 1 0 0 0 2 59 33 0 1 4 231640 27997 0 .25 50 1 1
    1001498 5 3 0 1 0 1 0 0 0 2 36 34 0 6 4 234254 27997 0   0 20 0 1
    5157721 5 3 0 2 0 1 0 0 0 2 70 34 0 1 4 234254 27997 0   0 50 1 1
    1001499 3 3 0 1 0 1 0 0 0 1  7 41 0 6 4 230195 28147 0 .38  0 0 1
    5157720 3 3 1 2 0 1 0 0 0 1 48 41 3 1 4 230195 28147 0 .38 20 1 1
    1001499 4 3 0 1 0 1 0 0 0 1 16 42 3 6 4 231640 28147 0 .25  0 0 1
    5157720 4 3 1 2 0 1 0 0 0 1 58 42 3 1 4 231640 28147 0 .25 50 1 1
    1001499 5 3 0 1 0 1 0 0 0 1 27 42 0 6 4 234254 28147 0   0 20 0 1
    5157720 5 3 0 2 0 1 0 0 0 1 69 42 0 1 4 234254 28147 0   0 50 1 1
    1001499 3 3 0 1 0 1 0 0 0 1  7 42 0 6 4 230195 28148 0 .38  0 0 1
    5157721 3 3 1 2 0 1 0 0 0 2 49 42 0 1 4 230195 28148 0 .38 20 1 1
    1001499 4 3 0 1 0 1 0 0 0 1 16 43 3 6 4 231640 28148 0 .25  0 0 1
    5157721 4 3 1 2 0 1 0 0 0 2 59 43 0 1 4 231640 28148 0 .25 50 1 1
    1001499 5 3 0 1 0 1 0 0 0 1 27 43 0 6 4 234254 28148 0   0 20 0 1
    5157721 5 3 0 2 0 1 0 0 0 2 70 43 0 1 4 234254 28148 0   0 50 1 1
    1001520 5 3 0 1 0 1 0 0 0 1  6 32 0 6 5 236055 28228 0   0  0 0 1
    1001513 5 3 1 2 0 1 0 0 0 1 38 32 1 1 5 236055 28228 0   0 20 1 1
    1001520 5 3 0 1 0 1 0 0 0 1  6 24 0 6 5 236055 28349 0   0  0 0 1
     934319 5 3 1 2 0 1 0 0 0 2 30 24 0 1 5 236055 28349 0   0 20 1 1
    1001567 2 3 0 1 0 1 0 0 0 2  9 29 0 6 4 200062 28913 0   0  0 0 1
    5157720 2 3 1 2 0 1 0 0 0 1 38 29 3 1 4 200062 28913 0   0 20 1 1
    1001567 3 3 0 1 0 1 0 0 0 2 19 29 0 6 4 230195 28913 0 .38  0 0 1
    5157720 3 3 1 2 0 1 0 0 0 1 48 29 3 1 4 230195 28913 0 .38 20 1 1
    1001567 4 3 0 1 0 1 0 0 0 2 29 29 0 6 4 231640 28913 0 .25 20 0 1
    5157720 4 3 1 2 0 1 0 0 0 1 58 29 3 1 4 231640 28913 0 .25 50 1 1
    1001567 5 3 1 1 0 0 0 1 0 2 39 30 0 1 5 235033 28913 0   0 20 0 1
    5157720 5 3 0 2 0 0 0 1 0 1 69 30 0 1 4 234254 28913 0   0 50 1 1
    end
    label values census census
    label def census 1 "1861", modify
    label def census 2 "1871", modify
    label def census 3 "1881", modify
    label def census 4 "1891", modify
    label def census 5 "1901", modify
    label def census 6 "1911", modify
    label values ligne2 lineage
    label def lineage 3 "Neutral", modify
    label values head head
    label def head 0 "No", modify
    label def head 1 "Yes", modify
    label values kin2 role
    label def role 1 "Parent", modify
    label def role 2 "Children", modify
    label values half half
    label def half 0 "No", modify
    label values coresid coresid
    label def coresid 0 "No", modify
    label def coresid 1 "Yes", modify
    label values same_sdistnam sdistnam
    label def sdistnam 0 "No", modify
    label def sdistnam 1 "Yes", modify
    label values same_distnam distnam
    label def distnam 0 "No", modify
    label def distnam 1 "Yes", modify
    label values same_context same_context
    label def same_context 0 "No", modify
    label values ego_sex sex
    label def sex 1 "Male", modify
    label def sex 2 "Female", modify
    label values ego_ses ses
    label def ses 1 "Higher occupations", modify
    label def ses 2 "Skilled workers", modify
    label def ses 3 "Farmers", modify
    label values ego_mat marital
    label def marital 1 "Married", modify
    label def marital 6 "Single", modify
    label values ego_context context
    label def context 2 "Rural", modify
    label def context 4 "Saturated rural", modify
    label def context 5 "Urban", modify
    label values kin_lsj kinlsj
    label def kinlsj 0 "No", modify
    label values agegrp agegrp
    label def agegrp 0 "0-19", modify
    label def agegrp 20 "20-49", modify
    label def agegrp 50 "50+", modify
Working...
X