Dear Statalist
I am working with dyadic panel data where I have multiple waves of observations nested within parent-child dyads (variable "dyad_id"), which are further nested within parents ("parent_id"). My goal is to assess the effect of children’s education ("ch_edu") on parental life satisfaction ("parent_lsat"). Notably, the outcome variable ("parent_lsat") is measured at the higher (parental) level.
To be more clear, my data are in the following format:
I am considering using the mixed command in Stata to fit a two-level random-effects model, treating the variance-covariance structure as unstructured and the standard errors clustered at the parental level. Here is an example of the command I am planning to use:
I would appreciate any feedback on this approach. Are there alternative models or methods that might be more appropriate for my data? Also, are there any potential issues I should be aware of when fitting this model?
Many thanks in advance for your help.
I am working with dyadic panel data where I have multiple waves of observations nested within parent-child dyads (variable "dyad_id"), which are further nested within parents ("parent_id"). My goal is to assess the effect of children’s education ("ch_edu") on parental life satisfaction ("parent_lsat"). Notably, the outcome variable ("parent_lsat") is measured at the higher (parental) level.
To be more clear, my data are in the following format:
Code:
* Example generated by -dataex-. For more info, type help dataex clear input float(parent_id dyad_id) byte wave float parent_lsat int parent_age byte(parent_edu parent_gender) float(ch_age ch_edu) byte ch_gender float ch_mstat 7 19 7 6 69 1 0 46 2 1 . 7 20 3 3 60 1 0 31 1 0 1 7 20 4 4 62 1 0 33 1 0 . 7 20 5 6 64 1 0 35 1 0 0 7 20 7 6 69 1 0 40 1 0 . 7 21 3 3 60 1 0 29 2 1 0 7 21 4 4 62 1 0 31 2 1 . 7 21 5 6 64 1 0 33 2 1 0 7 21 7 6 69 1 0 38 2 1 . 7 22 3 3 60 1 0 28 1 0 1 7 22 4 4 62 1 0 30 1 0 . 7 22 5 6 64 1 0 32 1 0 0 7 22 7 6 69 1 0 37 1 0 . 8 23 1 3 61 1 1 27 2 0 2 8 24 1 3 61 1 1 23 1 1 2 9 25 1 2 56 1 0 27 2 0 2 9 25 2 8 59 1 0 30 2 0 1 9 26 1 2 56 1 0 23 1 1 2 9 26 2 8 59 1 0 26 2 1 1 11 27 3 6 81 0 1 60 0 1 0 11 29 4 23 83 0 1 58 1 0 0 11 30 3 6 81 0 1 55 1 0 2 11 30 4 23 83 0 1 57 1 0 . 11 30 5 38 85 0 1 59 1 0 . 11 31 4 23 83 0 1 56 0 0 0 11 32 3 6 81 0 1 46 0 0 2 11 32 4 23 83 0 1 48 0 0 . 11 32 5 38 85 0 1 50 1 0 . 12 33 3 17 87 0 0 60 0 1 0 12 35 4 34 89 0 0 58 1 0 0 12 35 5 39 91 0 0 60 1 0 . 12 35 7 26 95 0 0 64 1 0 . 12 36 3 17 87 0 0 55 1 0 2 12 36 4 34 89 0 0 57 1 0 . 12 36 5 39 91 0 0 59 1 0 . 12 36 7 26 95 0 0 63 1 0 . 12 37 4 34 89 0 0 56 0 0 0 12 38 3 17 87 0 0 46 0 0 2 12 38 4 34 89 0 0 48 0 0 . 23 40 3 7 60 2 0 31 1 0 2 23 40 4 10 62 2 0 33 1 0 . 23 40 5 31 64 2 0 35 2 0 2 23 40 7 31 69 2 0 40 2 0 . 23 41 3 7 60 2 0 29 1 0 2 23 42 5 31 64 2 0 32 2 0 0 23 42 7 31 69 2 0 37 2 0 . 25 43 3 0 58 1 1 31 1 0 2 25 43 5 6 62 1 1 35 1 0 2 25 43 7 6 67 1 1 40 2 0 . 25 44 3 0 58 1 1 29 1 0 2 25 45 5 6 62 1 1 32 2 0 0 end label values wave lab_wave_year label values parent_age num label values parent_edu lab_isced label values ch_edu lab_isced label def lab_isced 0 "Low", modify label def lab_isced 1 "Med", modify label def lab_isced 2 "High", modify label values parent_gender gender label def gender 0 "Fathers", modify label def gender 1 "Mothers", modify label values ch_gender ch_gender label def ch_gender 0 "Son", modify label def ch_gender 1 "Daughter", modify label values ch_mstat combined_status_label label def combined_status_label 0 "Married", modify label def combined_status_label 1 "Cohabiting (not married)", modify label def combined_status_label 2 "Not cohabiting", modify
I am considering using the mixed command in Stata to fit a two-level random-effects model, treating the variance-covariance structure as unstructured and the standard errors clustered at the parental level. Here is an example of the command I am planning to use:
Code:
mixed parent_lsat i.ch_edu i.ch_gender ch_age i.parent_edu i.parent_gender || dyad_id:, vce(cluster parent_id) cov(un)
Many thanks in advance for your help.
Comment