Code:
gen H_L= . replace H_L = 1 if P1==1 & double_P2 == 1 replace H_L = 2 if P1==1 & double_P2 == 4 qui ttest alpha, by(H_L) unequal scalar t_D1 = r(t) scalar p_D1 = r(p)
For instance, to obtain the Bonferroni adjusted p-value, multiply the uncorrected p-value by the total number of comparisons, if so, do the nominal p-values be corrected?
Code:
margins P1#double_P2, pwcompare(effects) mcompare(bonferroni)

Comment