Announcement

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

  • Different labels for the same interaction term in two groups of a collect table (from r() and e() results

    Dear Statalist members,

    I am using Stata collect to build a custom table that combines results from a mixed model and its margins contrasts for two outcomes. My goal is to have two row groups:
    • Marginal contrast (from margins, contrast)
    • Other model parameters (from the main estimation, e.g., main effects, constant)
    The table looks fine except that the interaction term (1.exposure#1.period) appears in both groups, and for personal reasons I need to give it different names in each group. Under Marginal contrast it should be labelled "ATT (Intervention vs counterfactual at endline)", while under Other model parameters it should stay "Interaction (Period × Exposure)".

    Code:
    ------------------------------------------------------------------------------------------------------
                                             |  Contraceptive self-efficacy       Future aspirations score
                                             | Coefficient [95% CI] p-value   Coefficient [95% CI] p-value
    -----------------------------------------+------------------------------------------------------------
    Marginal contrast                        |                                                            
      Interaction (Period × Exposure)        |  0.581* [0.334, 0.828] 0.000    1.051* [0.312, 1.790] 0.005
    Other model parameters                   |                                                            
      Interaction (Period × Exposure)        |  0.581* [0.334, 0.828] 0.000    1.051* [0.312, 1.790] 0.005
      Comparison group change at endline     | -0.142 [-0.310, 0.027] 0.099   -0.432 [-0.910, 0.046] 0.077
      Intervention vs Comparison at baseline |  0.269* [0.113, 0.426] 0.001    1.102* [0.651, 1.552] 0.000
      Comparison group at baseline           |  3.478* [3.077, 3.880] 0.000 15.318* [13.984, 16.653] 0.000
    ------------------------------------------------------------------------------------------------------
    However, any attempt to rename the interaction term using collect label levels colname 1.exposure#1.period ... changes the label globally in both groups, because colname is a single dimension.
    I tried these but to no avail.
    Code:
    collect label levels colname Marginal_contrast#1.exposure#1.period ///
        "ATT (Intervention vs counterfactual at endline)", modify
        
    collect label levels colname Other_model_parameters#1.exposure#1.period ///
        "Interaction (Period × Exposure)", modify
    Because the interaction term 1.exposure#1.period is the same level of colname in both groups, any label applied to it affects both groups. I need a way to tell Stata: when this coefficient appears in the group "Marginal_contrast", use label A; when it appears in group "Other_model_parameters", use label B – while still displaying the group headers as separate row sections.

    I am looking for a way to assign group‑specific labels to the same coefficient without flattening the group dimension into the row labels. Is there a way to achieve this with collect (perhaps using collect style with conditions, or a different approach to stacking collections) that preserves the grouping structure?

    Thank you for any insights!

    Below is my code and data from dataex.
    Code:
    clear all
    use "asrhdata(4DiD).dta", clear
    
    cap drop q104age
    gen q104age = .
    replace q104age = 1 if q104==15
    replace q104age = 2 if q104==16
    replace q104age = 3 if q104==17
    replace q104age = 4 if q104==18
    replace q104age = 5 if q104==19
    cap label drop q104age
    label define q104age 1 "15" 2 "16" 3 "17" 4 "18" 5 "19"
    label val q104age q104age
    
    cap drop q115_merged2
    gen q115_merged2 = q115_merged
    replace q115_merged = . if q115_merged2==4
    
    label var q104age "Age"
    label var q109_merged "Highest education level"
    label var q115_merged "Religion"
    label var q301cat "Age at marriage (categories)"
    label var q303 "Ever given birth"
    label var q201cat "Household size (categories)"
    label var wealth_quintile "Wealth quintile"
    label var state_name "State"
    label var cse "Contraceptive self-efficacy"
    label var fasp "Future aspirations score"
    
    rename (q104age q109_merged q115_merged q301cat q303 q201cat wealth_quintile state_name) ///
           (age edu rel mage birth hhs wea sta)
    
    drop pick
    randomtag, count(100) gen(pick)
    dataex cse fasp age edu rel mage birth hhs wea sta if pick, count(100)  
    
    local outcomes cse fasp
    collect clear
    
    foreach outcome of local outcomes {
        di _n(2) as result "Processing: `outcome'"
        quietly mixed `outcome' i.exposure##i.period i.age i.edu i.rel i.mage i.birth i.hhs i.wea i.sta ///
                      [pweight=iptw_stabilized] || clustercode:, vce(cluster clustercode)
        collect create `outcome'_coll
        quietly collect: margins i.exposure#i.period, contrast(nowald)
        collect get r(), tags(group["Marginal_contrast"] outcome[`outcome'])    
        collect get e(), tags(group["Other_model_parameters"] outcome[`outcome'])
        
    }
    
    collect create combined
    collect combine all = cse_coll fasp_coll
    
    collect stars _r_p 0.05 "*", attach(_r_b)
    collect composite define ci = _r_lb _r_ub, delimiter(", ") trim
    collect style cell result[ci], sformat("[%s]")
    collect composite define coef_ci_p = _r_b ci _r_p, trim
    collect style cell result[coef_ci_p], sformat("%s")
    
    collect layout (group#colname[1.exposure#1.period 1.period 1.exposure _cons]) (outcome#result[coef_ci_p])
    
    collect style cell, nformat(%8.3f)
    collect style header result, title(hide)
    collect label levels result coef_ci_p "Coefficient [95% CI] p-value", modify
    
    collect label levels colname _cons "Comparison group at baseline", modify
    collect label levels colname 1.exposure "Intervention vs Comparison at baseline", modify
    collect label levels colname 1.period "Comparison group change at endline", modify
    collect label levels colname 1.exposure#1.period "Interaction (Period × Exposure)", modify
    
    collect label list result, all
    
    collect label levels colname Marginal_contrast#1.exposure#1.period ///
        "ATT (Intervention vs counterfactual at endline)", modify
        
    collect label levels colname Other_model_parameters#1.exposure#1.period ///
        "Interaction (Period × Exposure)", modify
        
    collect label levels group "Marginal_contrast" "Marginal contrast", modify
    collect label levels group "Other_model_parameters" "Other model parameters", modify
    collect label levels outcome cse "Contraceptive self-efficacy", modify
    collect label levels outcome fasp "Future aspirations score", modify
    
    collect dims
    collect levelsof group
    collect levelsof result
    
    collect title "Article DiD Table - Continuous"
    collect preview
    collect export ASRH_Results_REVISED.xlsx, sheet("Article_DiD_Continuous" replace) modify cell(A1)
    Data
    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input float(cse fasp age edu rel) byte(mage birth hhs) float wea byte sta
            4 16 4 2 3 2 1 2 3 2
     4.888889 20 5 3 3 2 1 1 5 2
            4 16 5 2 2 2 1 1 4 2
            2 16 2 . 3 2 2 1 3 2
    4.2222223 16 4 3 3 1 1 1 3 2
    4.6666665 16 5 1 3 2 1 1 2 2
            4 16 3 . 3 2 1 1 3 2
     4.111111 19 5 . 3 2 1 1 2 2
    4.4444447 19 5 2 3 2 2 1 4 2
     3.666667 13 4 2 2 2 1 2 4 2
            4 13 5 2 2 2 2 1 4 2
    3.5555556 16 2 . 3 2 2 2 2 2
     4.111111 11 4 . 3 2 2 1 4 2
     4.111111 16 5 2 3 2 1 1 3 1
     3.888889 18 4 . 3 2 2 1 5 1
            5 20 5 2 3 2 1 1 5 1
            5 18 5 2 3 2 1 1 3 1
     2.777778 15 5 . 3 2 1 1 2 1
            4 16 4 2 3 2 2 1 1 1
            4 16 5 2 3 1 1 1 4 1
     3.666667 16 5 . 3 2 1 1 2 1
     4.777778 19 5 2 3 2 2 1 5 1
            5 20 5 2 3 1 1 1 5 1
            4 16 3 3 3 2 1 1 5 1
     4.888889 19 5 2 3 2 1 1 5 1
    4.6666665 18 5 1 3 2 1 1 5 1
            2 14 5 . 3 1 1 1 1 1
            2 14 1 . 3 1 1 1 1 1
            4 16 5 2 3 1 1 1 1 1
            4 16 5 2 3 1 1 1 4 1
     3.111111 16 4 1 3 1 1 1 2 1
    2.2222223 12 2 . 3 2 2 1 1 1
            4 16 5 . 3 2 1 1 2 1
     3.888889 16 3 . 3 2 2 1 1 1
            3 15 4 . 3 2 2 1 1 1
     4.111111 18 5 . 2 2 2 1 2 1
    4.2222223 14 5 2 2 1 1 1 1 1
            4 18 5 2 3 1 1 1 3 1
    3.4444444 14 5 2 3 1 1 1 3 1
            4 16 5 2 3 2 1 1 4 1
    4.6666665 17 1 . 3 2 2 1 2 2
            4 16 4 2 3 1 1 1 5 2
     3.777778 16 4 2 3 2 2 1 5 2
     3.777778 16 4 2 3 2 2 1 5 2
            4 16 3 1 3 2 2 1 2 2
     3.777778 16 5 2 2 2 2 1 4 2
    4.6666665 18 4 2 3 1 1 1 2 1
            5 17 5 2 3 2 1 1 2 1
    4.5555553 19 3 2 3 1 1 1 5 1
     4.777778 18 4 2 3 2 1 1 5 1
    4.5555553 18 5 2 3 2 1 1 5 1
     4.777778 16 3 2 3 2 1 1 5 1
     3.888889 15 1 2 3 1 1 2 2 1
            4 16 4 2 2 2 1 1 1 1
            4 16 4 2 2 2 2 2 1 1
            4 16 5 1 2 2 2 2 1 1
     4.777778 19 1 1 3 1 1 1 3 2
    4.6666665 20 4 1 3 2 1 1 2 2
     3.111111 12 1 3 2 1 1 1 2 2
            4 16 5 2 3 2 1 1 4 2
            4 16 5 2 3 2 1 1 5 2
            4 16 1 2 3 1 1 1 3 2
     3.888889 16 5 1 3 1 1 2 3 2
    4.5555553 18 4 2 3 2 1 1 4 1
    4.5555553 17 4 2 3 2 1 1 3 1
    4.4444447 18 5 2 3 2 1 1 4 1
            5 20 4 2 3 2 1 1 5 1
     4.777778 19 4 1 3 2 1 1 3 1
    4.5555553 18 5 . 3 2 1 1 4 1
    4.6666665 19 4 3 3 2 1 1 5 1
    4.3333335 18 5 2 3 2 1 1 3 1
     4.777778 20 5 1 3 2 2 1 4 1
    4.4444447 16 4 2 3 2 1 1 3 1
    4.4444447 18 5 2 3 1 1 1 5 1
    4.5555553 17 5 2 3 1 1 2 5 1
    4.5555553 18 5 2 3 2 1 1 5 1
     4.777778 19 4 2 3 2 1 1 3 1
    4.4444447 18 5 2 3 2 1 1 5 1
    4.6666665 18 4 2 3 2 2 1 4 1
    2.3333333 12 5 2 3 2 2 1 2 1
            2 11 2 . 3 2 2 2 2 1
     1.888889 13 4 . 3 2 1 2 1 1
     2.666667 14 5 1 3 1 1 1 2 1
     2.666667 13 1 2 2 2 2 2 1 1
    4.4444447 19 5 . 2 2 1 2 2 1
    1.3333334  7 5 2 2 2 1 2 3 1
    1.2222222  8 2 . 2 2 1 2 1 1
            5 20 5 1 3 2 1 1 4 1
     3.777778 14 4 2 3 2 1 2 3 1
     3.777778 16 4 2 3 2 1 1 4 2
     3.777778 16 5 . 2 2 1 1 4 2
     3.777778 16 5 1 3 2 2 1 3 2
     3.777778 16 5 4 2 2 2 1 3 2
    4.5555553 18 4 1 2 2 1 2 3 1
    4.6666665 17 4 . 3 2 1 2 2 1
     3.333333 16 3 1 3 2 1 2 1 1
            2  8 4 2 3 2 1 1 1 1
    4.2222223 14 4 1 3 2 1 1 3 1
            4 16 5 1 2 2 1 2 1 1
     3.111111 14 5 2 2 2 2 1 1 1
    end
    label values age q104age
    label def q104age 1 "15", modify
    label def q104age 2 "16", modify
    label def q104age 3 "17", modify
    label def q104age 4 "18", modify
    label def q104age 5 "19", modify
    label values edu q109_merged_lbl
    label def q109_merged_lbl 1 "Primary", modify
    label def q109_merged_lbl 2 "Secondary", modify
    label def q109_merged_lbl 3 "Tertiary", modify
    label def q109_merged_lbl 4 "Other", modify
    label values rel q115_merged_lbl
    label def q115_merged_lbl 2 "Protestant/Other Christian", modify
    label def q115_merged_lbl 3 "Islam", modify
    label values mage q301cat
    label def q301cat 1 "<15", modify
    label def q301cat 2 "15-19", modify
    label values birth q303
    label def q303 1 "Yes", modify
    label def q303 2 "No", modify
    label values hhs q201cat
    label def q201cat 1 "1-5", modify
    label def q201cat 2 ">5", modify
    label values wea wealth_quintile
    label def wealth_quintile 1 "Very poor", modify
    label def wealth_quintile 2 "Poor", modify
    label def wealth_quintile 3 "Average", modify
    label def wealth_quintile 4 "Rich", modify
    label def wealth_quintile 5 "Very rich", modify
    label values sta state_name
    label def state_name 1 "KADUNA", modify
    label def state_name 2 "NASARAWA", modify
    Last edited by Kehinde Atoloye; 08 Mar 2026, 16:00.

  • #2
    Your example needs quite a bit of tweaking to work. Please ensure that you provide a reproducible example that runs whenever you post one. It is not logical for the same level of a dimension to have two different labels. Note that interacting a dimension with another dimension does not create new levels of the interacted dimensions. Here, 1.exposure#1.period is a level of the colname dimension. You should use collect recode to recode the dimension levels at the point when you create the collection, so that you avoid clashes later once you combine collections.

    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input float(cse fasp age edu rel) byte(mage birth hhs) float wea byte sta float(exposure period)
            4 16 4 2 3 2 1 2 3 2 0 1
     4.888889 20 5 3 3 2 1 1 5 2 0 0
            4 16 5 2 2 2 1 1 4 2 1 1
            2 16 2 . 3 2 2 1 3 2 0 1
    4.2222223 16 4 3 3 1 1 1 3 2 1 1
    4.6666665 16 5 1 3 2 1 1 2 2 0 0
            4 16 3 . 3 2 1 1 3 2 1 1
     4.111111 19 5 . 3 2 1 1 2 2 1 1
    4.4444447 19 5 2 3 2 2 1 4 2 0 1
     3.666667 13 4 2 2 2 1 2 4 2 1 1
            4 13 5 2 2 2 2 1 4 2 0 0
    3.5555556 16 2 . 3 2 2 2 2 2 0 0
     4.111111 11 4 . 3 2 2 1 4 2 0 1
     4.111111 16 5 2 3 2 1 1 3 1 1 1
     3.888889 18 4 . 3 2 2 1 5 1 0 0
            5 20 5 2 3 2 1 1 5 1 1 0
            5 18 5 2 3 2 1 1 3 1 1 1
     2.777778 15 5 . 3 2 1 1 2 1 0 1
            4 16 4 2 3 2 2 1 1 1 1 1
            4 16 5 2 3 1 1 1 4 1 1 0
     3.666667 16 5 . 3 2 1 1 2 1 1 0
     4.777778 19 5 2 3 2 2 1 5 1 0 0
            5 20 5 2 3 1 1 1 5 1 0 1
            4 16 3 3 3 2 1 1 5 1 1 1
     4.888889 19 5 2 3 2 1 1 5 1 1 1
    4.6666665 18 5 1 3 2 1 1 5 1 0 1
            2 14 5 . 3 1 1 1 1 1 1 1
            2 14 1 . 3 1 1 1 1 1 1 0
            4 16 5 2 3 1 1 1 1 1 1 1
            4 16 5 2 3 1 1 1 4 1 0 0
     3.111111 16 4 1 3 1 1 1 2 1 1 0
    2.2222223 12 2 . 3 2 2 1 1 1 0 1
            4 16 5 . 3 2 1 1 2 1 1 0
     3.888889 16 3 . 3 2 2 1 1 1 0 0
            3 15 4 . 3 2 2 1 1 1 0 0
     4.111111 18 5 . 2 2 2 1 2 1 1 1
    4.2222223 14 5 2 2 1 1 1 1 1 0 0
            4 18 5 2 3 1 1 1 3 1 1 0
    3.4444444 14 5 2 3 1 1 1 3 1 0 1
            4 16 5 2 3 2 1 1 4 1 0 0
    4.6666665 17 1 . 3 2 2 1 2 2 1 0
            4 16 4 2 3 1 1 1 5 2 1 1
     3.777778 16 4 2 3 2 2 1 5 2 1 1
     3.777778 16 4 2 3 2 2 1 5 2 0 0
            4 16 3 1 3 2 2 1 2 2 0 1
     3.777778 16 5 2 2 2 2 1 4 2 0 0
    4.6666665 18 4 2 3 1 1 1 2 1 0 1
            5 17 5 2 3 2 1 1 2 1 0 0
    4.5555553 19 3 2 3 1 1 1 5 1 1 0
     4.777778 18 4 2 3 2 1 1 5 1 1 0
    4.5555553 18 5 2 3 2 1 1 5 1 0 1
     4.777778 16 3 2 3 2 1 1 5 1 1 0
     3.888889 15 1 2 3 1 1 2 2 1 0 0
            4 16 4 2 2 2 1 1 1 1 1 0
            4 16 4 2 2 2 2 2 1 1 0 0
            4 16 5 1 2 2 2 2 1 1 1 0
     4.777778 19 1 1 3 1 1 1 3 2 0 0
    4.6666665 20 4 1 3 2 1 1 2 2 1 1
     3.111111 12 1 3 2 1 1 1 2 2 0 1
            4 16 5 2 3 2 1 1 4 2 1 1
            4 16 5 2 3 2 1 1 5 2 1 0
            4 16 1 2 3 1 1 1 3 2 0 0
     3.888889 16 5 1 3 1 1 2 3 2 1 1
    4.5555553 18 4 2 3 2 1 1 4 1 1 1
    4.5555553 17 4 2 3 2 1 1 3 1 0 1
    4.4444447 18 5 2 3 2 1 1 4 1 0 1
            5 20 4 2 3 2 1 1 5 1 1 0
     4.777778 19 4 1 3 2 1 1 3 1 1 0
    4.5555553 18 5 . 3 2 1 1 4 1 1 0
    4.6666665 19 4 3 3 2 1 1 5 1 0 0
    4.3333335 18 5 2 3 2 1 1 3 1 1 0
     4.777778 20 5 1 3 2 2 1 4 1 1 0
    4.4444447 16 4 2 3 2 1 1 3 1 1 0
    4.4444447 18 5 2 3 1 1 1 5 1 1 0
    4.5555553 17 5 2 3 1 1 2 5 1 1 0
    4.5555553 18 5 2 3 2 1 1 5 1 0 0
     4.777778 19 4 2 3 2 1 1 3 1 1 0
    4.4444447 18 5 2 3 2 1 1 5 1 0 1
    4.6666665 18 4 2 3 2 2 1 4 1 0 1
    2.3333333 12 5 2 3 2 2 1 2 1 0 0
            2 11 2 . 3 2 2 2 2 1 1 1
     1.888889 13 4 . 3 2 1 2 1 1 1 0
     2.666667 14 5 1 3 1 1 1 2 1 0 0
     2.666667 13 1 2 2 2 2 2 1 1 1 0
    4.4444447 19 5 . 2 2 1 2 2 1 0 0
    1.3333334  7 5 2 2 2 1 2 3 1 1 0
    1.2222222  8 2 . 2 2 1 2 1 1 1 0
            5 20 5 1 3 2 1 1 4 1 0 1
     3.777778 14 4 2 3 2 1 2 3 1 0 1
     3.777778 16 4 2 3 2 1 1 4 2 1 0
     3.777778 16 5 . 2 2 1 1 4 2 0 0
     3.777778 16 5 1 3 2 2 1 3 2 1 0
     3.777778 16 5 4 2 2 2 1 3 2 1 0
    4.5555553 18 4 1 2 2 1 2 3 1 1 0
    4.6666665 17 4 . 3 2 1 2 2 1 1 1
     3.333333 16 3 1 3 2 1 2 1 1 0 1
            2  8 4 2 3 2 1 1 1 1 1 0
    4.2222223 14 4 1 3 2 1 1 3 1 0 1
            4 16 5 1 2 2 1 2 1 1 0 0
     3.111111 14 5 2 2 2 2 1 1 1 0 0
    end
    label values age q104age
    label def q104age 1 "15", modify
    label def q104age 2 "16", modify
    label def q104age 3 "17", modify
    label def q104age 4 "18", modify
    label def q104age 5 "19", modify
    label values edu q109_merged_lbl
    label def q109_merged_lbl 1 "Primary", modify
    label def q109_merged_lbl 2 "Secondary", modify
    label def q109_merged_lbl 3 "Tertiary", modify
    label def q109_merged_lbl 4 "Other", modify
    label values rel q115_merged_lbl
    label def q115_merged_lbl 2 "Protestant/Other Christian", modify
    label def q115_merged_lbl 3 "Islam", modify
    label values mage q301cat
    label def q301cat 1 "<15", modify
    label def q301cat 2 "15-19", modify
    label values birth q303
    label def q303 1 "Yes", modify
    label def q303 2 "No", modify
    label values hhs q201cat
    label def q201cat 1 "1-5", modify
    label def q201cat 2 ">5", modify
    label values wea wealth_quintile
    label def wealth_quintile 1 "Very poor", modify
    label def wealth_quintile 2 "Poor", modify
    label def wealth_quintile 3 "Average", modify
    label def wealth_quintile 4 "Rich", modify
    label def wealth_quintile 5 "Very rich", modify
    label values sta state_name
    label def state_name 1 "KADUNA", modify
    label def state_name 2 "NASARAWA", modify
    
    local outcomes cse fasp
    
    collect clear
    
    foreach outcome of local outcomes {
        di _n(2) as result "Processing: `outcome'"
        quietly mixed `outcome' i.exposure##i.period i.age i.edu i.rel i.mage i.birth i.hhs i.wea i.sta
        collect create `outcome'_coll
        collect: margins i.exposure#i.period, contrast(nowald)
        collect get r(), tags(group["Marginal_contrast"] outcome[`outcome'])  
        collect recode colname 1.exposure#1.period = interaction1, fortags(group["Marginal_contrast"] outcome[`outcome'])
        collect get e(), tags(group["Other_model_parameters"] outcome[`outcome'])
        
    }
    
    collect create combined
    collect combine all = cse_coll fasp_coll
    
    collect recode colname 1.exposure#1.period = interaction2, fortags(group["Other_model_parameters"] outcome[`outcome'])
    collect stars _r_p 0.05 "*", attach(_r_b)
    collect composite define ci = _r_lb _r_ub, delimiter(", ") trim
    collect style cell result[ci], sformat("[%s]")
    collect composite define coef_ci_p = _r_b ci _r_p, trim
    collect style cell result[coef_ci_p], sformat("%s")
    
    collect layout (group#colname[interaction1 interaction2 1.period 1.exposure _cons]) (outcome#result[coef_ci_p])
    
    collect style cell, nformat(%8.3f)
    collect style header result, title(hide)
    collect label levels result coef_ci_p "Coefficient [95% CI] p-value", modify
    
    collect label levels colname _cons "Comparison group at baseline", modify
    collect label levels colname 1.exposure "Intervention vs Comparison at baseline", modify
    collect label levels colname 1.period "Comparison group change at endline", modify
    collect label levels colname 1.exposure#1.period "Interaction (Period × Exposure)", modify
    
    collect label list result, all
    
    collect label levels colname interaction1 ///
        "ATT (Intervention vs counterfactual at endline)", modify
        
    collect label levels colname interaction2 ///
        "Interaction (Period × Exposure)", modify
        
    collect label levels group "Marginal_contrast" "Marginal contrast", modify
    collect label levels group "Other_model_parameters" "Other model parameters", modify
    collect label levels outcome cse "Contraceptive self-efficacy", modify
    collect label levels outcome fasp "Future aspirations score", modify
    
    
    
    
    collect dims
    collect levelsof group
    collect levelsof result
    
    collect title "Article DiD Table - Continuous"
    collect preview
    collect export ASRH_Results_REVISED.xlsx, sheet("Article_DiD_Continuous" replace) modify cell(A1)
    Res.:

    Code:
    . collect preview
    
    Article DiD Table - Continuous
    ---------------------------------------------------------------------------------------------------------------
                                                      |  Contraceptive self-efficacy       Future aspirations score
                                                      | Coefficient [95% CI] p-value   Coefficient [95% CI] p-value
    --------------------------------------------------+------------------------------------------------------------
    Marginal contrast                                 |                                                            
     ATT (Intervention vs counterfactual at endline) |  0.263 [-0.316, 0.842] 0.373    0.338 [-1.602, 2.277] 0.733
    Other model parameters                            |                                                            
     Interaction (Period × Exposure)                 |  0.263 [-0.316, 0.842] 0.373    0.338 [-1.602, 2.277] 0.733
      Comparison group change at endline              | -0.031 [-0.432, 0.370] 0.879    0.039 [-1.304, 1.382] 0.955
      Intervention vs Comparison at baseline          | -0.257 [-0.641, 0.127] 0.189   -0.204 [-1.489, 1.081] 0.756
      Comparison group at baseline                    |  4.184* [3.354, 5.014] 0.000 16.517* [13.735, 19.298] 0.000
    ---------------------------------------------------------------------------------------------------------------
    Last edited by Andrew Musau; 09 Mar 2026, 09:30.

    Comment

    Working...
    X