******************************************** **** Analyses Visibility Meta- Analysis **** ******************************************** * Version: Stata 15.0 ************** *** Set-up *** ************** * Data cd "\..." // set working directory here import excel "Coded studies\Dataset.xls", sheet("Data") cellrange(A3:EQ93) firstrow clear do "Do-files\Data Prep.do" capture program drop matrixresults program define matrixresults mat bmat = e(b) mat vmat= e(V) mat dfmat= e(dfs) end * Weighting variants global w1 "study(id) variance(var_w_can) weighttype(random)" global w2 "study(id) variance(var_w_logcan) weighttype(random)" global w3 "study(id) variance(var_w_can) weighttype(fixed)" global w4 "study(id) variance(var_w_logcan) weighttype(fixed)" global w5 ", " global w6 ", cluster(id)" global w7 "[aweight=w_can]" global w8 "[aweight=w_can] , cluster(id)" global weightlist blablabla "$w1" "$w2" "$w3" "$w4" "$w5" "$w6" "$w7" "$w8" ******************************* *** Descriptive information *** ******************************* * Overal info, number of studies and substudies included, mean visibility count // 90 total of substudies in articles, chapters etc count if substudynr==1 // 74 total of publications (Note that two chapters by Fridkin and Kenney are counted as one publication. In the literature search these were seperate references, so counting as two, leading to 75 publications. It is important to code them here as part of one publication, to take the nesting into account) count if vis_d!=. // 70 total substudies that include visibility count if substudynr==1 & vis_d!=. // 56 total publications include visbility * Low estimate of total n qui sum n_candidates if substudynr==1 di "total number of candidates (low estimate): " int(r(sum)) qui sum n_femalecandidates if substudynr==1 di "total number of female candidates (low estimate): " int(r(sum)) qui sum n_stories if substudynr==1 di "total number of coded stories (low estimate): " int(r(sum)) * Estimates of total n if no overlap between substudies qui sum n_candidates di "total number of candidates (high estimate): " int(r(sum)) qui sum n_femalecandidates di "total number of female candidates (high estimate): " int(r(sum)) qui sum n_stories di "total number of coded stories (high estimate): " int(r(sum)) * Forest plot vis_d, with prediction and CI gen xarea = . gen yarea = . robumeta vis_d_nocontrols, study(id) variance(var_w_can) weighttype(random) mat bmat = e(b) mat vmat= e(V) mat dfmat= e(dfs) local b = bmat[1,1] local se = (vmat[1,1])^.5 local df = dfmat[1,1] replace xarea = `b' - invttail(`df',0.025) * `se' in 1 replace xarea = `b' + invttail(`df',0.025) * `se' in 2 qui sum vis_d replace yarea = r(N) in 1/2 capture drop orderforest sort vis_d gen orderforest = _n if vis_d!=. labmask orderforest, values(authorsshort) qui sum orderforest local maxylabel = r(max) twoway (scatter orderforest vis_d_nocontrols, m(none) mcol(black)) /// (area yarea xarea, lw(none) col(gs13%30) ) /// (scatter orderforest vis_d_controlsonly, msize(tiny) m(o) mcol(gs10)) /// (scatter orderforest vis_d_nocontrols, msize(tiny) m(o) ylabel(1(1)`maxylabel', val /// angle(horizontal) labs(tiny))), ytitle("") aspect(2) /// scheme(Tufte) legend(off) /// xlabel(-.5(.25).5, labs(vsmall) labgap(*.25)) xscale(range(-.5 .5)) /// xtitle("Gender effect size on visibility (d')", size(vsmall)) /// xline(`b', lpattern(shortdash) lw(thin) lc(gs7) ) /// xline(0, lw(medthin)) graph save Graph "Output\forest plot.gph", replace drop orderforest xarea yarea sort order * Table showing what the data (on visibility) look like preserve keep if vis_d!=. keep authorsshort country countrycode officeneat vis_d_nocontrols vis_d_controlsonly n_candidates_string n_stories_string control_description control_index sort authors officeneat rename (authorsshort officeneat) (publication office) export excel using "Output\description visibility.xls", replace firstrow(var) restore **************** *** Analyses *** **************** * Is there significant heterogeneity? //gen se = var_w_can^.5 //metan vis_d se, random // answer: yes * Main models, including different specifications global modelnames = "Base Officelevel Officetype Electoralsystemtype Electiontype Campaign Time Femalerepresentation" global Base = "" global Officelevel = "lev2 lev3" global Officetype = "legi2 legi3 legi4" global Electoralsystemtype = "esys2 esys3" global Electiontype = "elec2 elec3" global Campaign = "rou2 rou3" global Time = "midtime" global Femalerepresentation = "femalerepresentation" foreach model of global modelnames { local count = 0 foreach weight of global weightlist { if `count'>0 { if `count'<5 { robumeta vis_d_controls $`model' vis_d_dumcontrols , `weight' } else { reg vis_d_controls $`model' vis_d_dumcontrols `weight' } matrixresults local ivcount = 1 foreach dummy of global `model' { qui replace coefficient_`count' = bmat[1,`ivcount'] if variable=="`dummy'" & model=="`model'" qui replace se_`count' = (vmat[`ivcount',`ivcount'])^.5 if variable=="`dummy'" & model=="`model'" qui replace dfs_`count' = dfmat[1,`ivcount'] if variable=="`dummy'" & model=="`model'" local ivcount = `ivcount' + 1 } qui replace coefficient_`count' = bmat[1,`ivcount'] if variable=="controldummy" & model=="`model'" qui replace se_`count' = (vmat[`ivcount',`ivcount'])^.5 if variable=="controldummy" & model=="`model'" qui replace dfs_`count' = dfmat[1,`ivcount'] if variable=="controldummy" & model=="`model'" local ivcount = `ivcount' + 1 qui replace coefficient_`count' = bmat[1,`ivcount'] if variable=="_cons" & model=="`model'" qui replace se_`count' = (vmat[`ivcount',`ivcount'])^.5 if variable=="_cons" & model=="`model'" qui replace dfs_`count' = dfmat[1,`ivcount'] if variable=="_cons" & model=="`model'" } local count = `count' + 1 } } * Table main results including different specifications preserve keep variablename model coefficient_1 se_1 dfs_1 coefficient_2 se_2 dfs_2 coefficient_3 se_3 dfs_3 coefficient_4 se_4 dfs_4 coefficient_5 se_5 coefficient_6 se_6 coefficient_7 se_7 coefficient_8 se_8 order model variablename keep if model!="" replace model="" if coefficient_1!=. export excel using "Output\results appendix B1 full models.xls", replace restore * Robustness: results excluding studies with recalculations and estimated N global c1 ", study(id) variance(var_w_can) weighttype(random)" global c2 "if n_candidates_estimated!=1, study(id) variance(var_w_can) weighttype(random)" global c3 "if robust_rec!=1 & robust_con!=1, study(id) variance(var_w_can) weighttype(random)" global robustlist blablabla "$c1" "$c2" "$c3" local count = 1 foreach model of global modelnames { robumeta vis_d $`model' $c1 matrixresults local ivcount = 1 foreach dummy of global `model' { qui replace coefficient_robust`count' = bmat[1,`ivcount'] if variable=="`dummy'" & model=="`model'" qui replace se_robust`count' = (vmat[`ivcount',`ivcount'])^.5 if variable=="`dummy'" & model=="`model'" qui replace dfs_robust`count' = dfmat[1,`ivcount'] if variable=="`dummy'" & model=="`model'" local ivcount = `ivcount' + 1 } qui replace coefficient_robust`count' = bmat[1,`ivcount'] if variable=="_cons" & model=="`model'" qui replace se_robust`count' = (vmat[`ivcount',`ivcount'])^.5 if variable=="_cons" & model=="`model'" qui replace dfs_robust`count' = dfmat[1,`ivcount'] if variable=="_cons" & model=="`model'" } local count = 2 foreach model of global modelnames { robumeta vis_d_controls $`model' vis_d_dumcontrols $c2 matrixresults local ivcount = 1 foreach dummy of global `model' { qui replace coefficient_robust`count' = bmat[1,`ivcount'] if variable=="`dummy'" & model=="`model'" qui replace se_robust`count' = (vmat[`ivcount',`ivcount'])^.5 if variable=="`dummy'" & model=="`model'" qui replace dfs_robust`count' = dfmat[1,`ivcount'] if variable=="`dummy'" & model=="`model'" local ivcount = `ivcount' + 1 } qui replace coefficient_robust`count' = bmat[1,`ivcount'] if variable=="controldummy" & model=="`model'" qui replace se_robust`count' = (vmat[`ivcount',`ivcount'])^.5 if variable=="controldummy" & model=="`model'" qui replace dfs_robust`count' = dfmat[1,`ivcount'] if variable=="controldummy" & model=="`model'" local ivcount = `ivcount' + 1 qui replace coefficient_robust`count' = bmat[1,`ivcount'] if variable=="_cons" & model=="`model'" qui replace se_robust`count' = (vmat[`ivcount',`ivcount'])^.5 if variable=="_cons" & model=="`model'" qui replace dfs_robust`count' = dfmat[1,`ivcount'] if variable=="_cons" & model=="`model'" } local count = 3 foreach model of global modelnames { robumeta vis_d_controls $`model' vis_d_dumcontrols $c3 matrixresults local ivcount = 1 foreach dummy of global `model' { qui replace coefficient_robust`count' = bmat[1,`ivcount'] if variable=="`dummy'" & model=="`model'" qui replace se_robust`count' = (vmat[`ivcount',`ivcount'])^.5 if variable=="`dummy'" & model=="`model'" qui replace dfs_robust`count' = dfmat[1,`ivcount'] if variable=="`dummy'" & model=="`model'" local ivcount = `ivcount' + 1 } qui replace coefficient_robust`count' = bmat[1,`ivcount'] if variable=="controldummy" & model=="`model'" qui replace se_robust`count' = (vmat[`ivcount',`ivcount'])^.5 if variable=="controldummy" & model=="`model'" qui replace dfs_robust`count' = dfmat[1,`ivcount'] if variable=="controldummy" & model=="`model'" local ivcount = `ivcount' + 1 qui replace coefficient_robust`count' = bmat[1,`ivcount'] if variable=="_cons" & model=="`model'" qui replace se_robust`count' = (vmat[`ivcount',`ivcount'])^.5 if variable=="_cons" & model=="`model'" qui replace dfs_robust`count' = dfmat[1,`ivcount'] if variable=="_cons" & model=="`model'" } * Table robustness specifications preserve keep variablename model coefficient_robust* se_robust* dfs_robust* order model variablename keep if variablename!="" export excel using "Output\results appendix B2 robustness.xls", replace restore * Additional analyses for electoral system global esysmodel1 = "disproportionality" global esysmodel2 = "numberofparties_enpp" global esysmodel3 = "personalorientation" global esysmodel4 = "reg2" global esysmodel5 = "personalorientation reg2" global esysmodel6 = "personalorientation numberofparties_enpp" global esysmodel7 = "reg2 numberofparties_enpp" global esysmodels = "esysmodel1 esysmodel2 esysmodel3 esysmodel4 esysmodel5 esysmodel6 esysmodel7" local count = 0 foreach model of global esysmodels { robumeta vis_d_controls $`model' vis_d_dumcontrols, $w1 matrixresults local ivcount = 1 foreach variable of global `model' { local count = `count' + 1 replace n_esys = e(N) in `count' replace variable_esys = "`variable'" in `count' qui replace coefficient_esys = bmat[1,`ivcount'] in `count' qui replace se_esys = (vmat[`ivcount',`ivcount'])^.5 in `count' qui replace dfs_esys = dfmat[1,`ivcount'] in `count' local ivcount = `ivcount' + 1 } local count = `count' + 1 replace variable_esys = "controldummy" in `count' qui replace coefficient_esys = bmat[1,`ivcount'] in `count' qui replace se_esys = (vmat[`ivcount',`ivcount'])^.5 in `count' qui replace dfs_esys = dfmat[1,`ivcount'] in `count' local ivcount = `ivcount' + 1 local count = `count' + 1 replace variable_esys = "constant" in `count' qui replace coefficient_esys = bmat[1,`ivcount'] in `count' qui replace se_esys = (vmat[`ivcount',`ivcount'])^.5 in `count' qui replace dfs_esys = dfmat[1,`ivcount'] in `count' } replace p_esys = ttail(dfs_esys,abs(coefficient_esys)/se_esys)*2 preserve keep coefficient_esys se_esys dfs_esys n_esys p_esys variable_esys keep if coefficient_esys!=. gen model = 1 in 1 local N = _N forval i = 2/`N' { replace model = model[_n-1] in `i' if variable_esys[_n-1]!="constant" replace model = model[_n-1]+1 in `i' if variable_esys[_n-1]=="constant" } export excel using "Output\results electoral systems.xls", replace restore * Additional models: medium type and authorship robumeta vis_d_controls femalerep esys2 esys3 vis_d_dumcontrols, $w1 matrixresults forval count = 1/5 { qui replace coefficient_add = bmat[1,`count'] in `count' qui replace se_add = (vmat[`count',`count'])^.5 in `count' qui replace dfs_add = dfmat[1,`count'] in `count' } robumeta vis_d_controls mediumtype2 mediumtype3 vis_d_dumcontrols, $w1 matrixresults forval count = 1/4 { local rowcount = `count' + 5 qui replace coefficient_add = bmat[1,`count'] in `rowcount' qui replace se_add = (vmat[`count',`count'])^.5 in `rowcount' qui replace dfs_add = dfmat[1,`count'] in `rowcount' } robumeta vis_d_controls newspapertype2 newspapertype3 newspapertype4 vis_d_dumcontrols if newspapertype!=9, $w1 // matrixresults forval count = 1/5 { local rowcount = `count' + 9 qui replace coefficient_add = bmat[1,`count'] in `rowcount' qui replace se_add = (vmat[`count',`count'])^.5 in `rowcount' qui replace dfs_add = dfmat[1,`count'] in `rowcount' } robumeta vis_d_controls authorsshare vis_d_dumcontrols, $w1 matrixresults forval count = 1/3 { local rowcount = `count' + 14 qui replace coefficient_add = bmat[1,`count'] in `rowcount' qui replace se_add = (vmat[`count',`count'])^.5 in `rowcount' qui replace dfs_add = dfmat[1,`count'] in `rowcount' } robumeta vis_d_controls vis_d_dumcontrols if authorsshare==0, $w1 // (n=6) matrixresults forval count = 1/2 { local rowcount = `count' + 17 qui replace coefficient_add = bmat[1,`count'] in `rowcount' qui replace se_add = (vmat[`count',`count'])^.5 in `rowcount' qui replace dfs_add = dfmat[1,`count'] in `rowcount' } robumeta vis_d_controls vis_d_dumcontrols if authorsshare>0 & authorsshare<1, $w1 // (n=13) matrixresults forval count = 1/2 { local rowcount = `count' + 19 qui replace coefficient_add = bmat[1,`count'] in `rowcount' qui replace se_add = (vmat[`count',`count'])^.5 in `rowcount' qui replace dfs_add = dfmat[1,`count'] in `rowcount' } robumeta vis_d_controls vis_d_dumcontrols if authorsshare==1, $w1 // (n=51) matrixresults forval count = 1/2 { local rowcount = `count' + 21 qui replace coefficient_add = bmat[1,`count'] in `rowcount' qui replace se_add = (vmat[`count',`count'])^.5 in `rowcount' qui replace dfs_add = dfmat[1,`count'] in `rowcount' } * Inspect models without dummy for control variable, due to the low power robumeta vis_d_controls if authorsshare==0, $w1 // (n=6) robumeta vis_d_controls if authorsshare>0 & authorsshare<1, $w1 // (n=13) robumeta vis_d_controls if authorsshare==1, $w1 // (n=51) * Table preserve keep *_add keep if coefficient_add!=. export excel using "Output\results additional.xls", replace restore ************************* *** Citation analysis *** ************************* preserve recode visibility (9=.) collapse (mean) vis_d_controls citations year1990 region outlettype authorsshare authorsfirstfemale n_stories log_stories n_femalecandidates log_femalecan (first) authorsshort, by(id) recode region (2.1/2.9=.) poisson citations year1990 , irr est store cite1 poisson citations vis_d , irr est store cite2 poisson citations c.vis_d##c.year1990 , irr est store cite3 poisson citations authorsshare year1990, irr est store cite4 poisson citations i.authorsfirst year1990, irr est store cite5 poisson citations c.vis_d##c.authorsshare year1990, irr est store cite6 poisson citations authorsfirst##c.vis_d year1990, irr est store cite7 estout cite1 cite2 cite3 cite4 cite5 cite6 cite7 /// using "Output\results appendix citations.xls" /// , replace eform cells((b(f(%4.3f))) p(par) ) stats(N r2_p, f(%4.0f %4.2f)) lz varwidth(30) /// rename(year1990 "Year_(1990=0)" vis_d "d'" c.vis_d#c.year1990 "d'_x_year" /// authorsshare "Share_female_authors" 1.authorsfirstfemale /// "Female_first_author" 1.authorsfirstfemale#c.vis_d "Female_first_author_x_d'" /// c.vis_d#c.authorsshare "Female_authors_x_d'" /// _cons Constant) order("Year_(1990=0)" "d'" "d'_x_year" "Share_female_authors" /// "Female_first_author" "Female_first_author_x_d'" "Female_authors_x_d'" /// "Constant") drop(0.authorsfirstfemale 0.authorsfirstfemale#c.vis_d_controls) est restore cite3 margins, at(vis_d=(-.55(.05)0.55) year1990=(5 25)) marginsplot, scheme(tufte) recast(line) recastci(rarea) /// addplot((scatter citations vis_d if year1990<=10, mcol(red) msym(O) msiz(small)) /// (scatter citations vis_d if year1990>=20, mcol(blue) msym(O) msiz(small)) /// (scatter citations vis_d if year1990>10 & year1990<20, mcol(gs10) msym(O) msiz(small) /// legend(order(1 "Prediction if publication year=1995" /// 2 "Prediction if publication year=2015" ) cols(1) pos(3) ) ) ) /// ytitle(Number of citations) title("") xlabel(-.5(.25).5) xtitle(Female visibility) /// note("Note: Red dots are studies published before 2001, blue dots after 2010, grey dots in between.") graph play "Do-files\CIgrey" margins, at(year1990=(1(1)28) vis_d=(-.20 .20)) marginsplot, scheme(tufte) recast(line) recastci(rarea) /// addplot((scatter citations year1990 if vis_d<0, mcol(red) msym(O) msiz(small)) /// (scatter citations year1990 if vis_d>0, mcol(blue) msym(O) msiz(small)) /// (scatter citations year1990 if vis_d==0, mcol(gs10) msym(O) msiz(small) /// legend(order(1 "Prediction if female visibility (d')=-0.20" /// 2 "Prediction if female visibility (d')=0.20" ) cols(1) pos(3) ) ) ) /// ytitle(Number of citations) title("") xlabel(0 "1990" 10 "2000" 20 "2010" 30 "2020") xtitle(Publication year) /// note("Note: Red dots are studies with d' below 0, blue dots above 0, grey dots 0.") graph play "Do-files\CIgrey" est restore cite6 qui margins, at(vis_d=(-.5(.03).5) authors=(0 1)) marginsplot, scheme(tufte) recast(line) recastci(rarea) /// addplot((scatter citations vis_d if authorsshare==1, mcol(blue) msym(O) msiz(small)) /// (scatter citations vis_d if authorsshare>0 & authorsshare<1, mcol(gs9) msym(O) msiz(small)) /// (scatter citations vis_d if authorsshare==0, mcol(red) msym(O) msiz(small) /// legend(order(1 "Prediction for male only authors team" /// 2 "Prediction for female only authors team" ) cols(1) pos(3) ) ) ) /// ytitle(Number of citations) title("") xlabel(-.5(.25).5) xtitle(Female visibility) /// note("Note: Red dots are studies with a male team, blue dots with a female team, grey a mixed team.") graph play "Do-files\CIgrey" est restore cite7 qui margins, at(vis_d=(-.5(.03).5) authors=(0 1)) marginsplot, scheme(tufte) recast(line) recastci(rarea) /// addplot((scatter citations vis_d if authorsfir==1, mcol(blue) msym(O) msiz(small)) /// (scatter citations vis_d if authorsfir==0, mcol(red) msym(O) msiz(small) /// legend(order(1 "Prediction for male first author" /// 2 "Prediction for female first author" ) cols(1) pos(3) ) ) ) /// ytitle(Number of citations) title("") xlabel(-.5(.25).5) xtitle(Female visibility) /// note("Note: Red dots are studies with a male first author, blue dots with a female first author.") graph play "Do-files\CIgrey" restore ************* *** Extra *** ************* * Models mentioned in footnotes in the paper * Attributes of study: controls * Add a dummy for specifically the statistical control that was used in the study, per dummy. 23 dummies, each estimated for all of the moderator models (8) capture drop tempcontrol foreach var of newlist _proximityelection _electoralsystem _typeofoffice _period _region _femalerepresentation _ownmessage _cometitiveness _incumbency _fundraising _party _partysize _powerposition _listposition _experience _age _activity _novelty _genderopponent _mediaposition _mediatype _mediasize _genderjournalist { di "**** `var' ****" gen tempcontrol = 0 replace tempcontrol = 1 if regex(control`var', "tatistical") | regex(controlalt`var', "tatistical") foreach model of global modelnames { di "**** `var' `model' ****" robumeta vis_d_controls tempcontrol $`model' , $w1 } drop tempcontrol } * Seperate models for US only * Main models, including different specifications gen variablename_us = variablename replace variablename_us = "Constant (2. National)" if variablename=="Constant (1. Supranational)" replace variablename_us = "3. Sub-national" if variablename=="2. National" replace variablename_us = "4. Local" if variablename=="3. Sub-national" replace variablename_us = "5. Combination" if variablename=="4. Local" replace variablename_us = "" if variablename=="5. Combination of levels" replace variablename_us = "" if variablename=="5. Combination of levels" gen variable_us = variable replace variable_us = "lev3" if variablename=="2. National" replace variable_us = "lev4" if variablename=="3. Sub-national" replace variable_us = "lev5" if variablename=="4. Local" replace variable_us = "" if variablename=="5. Combination of levels" replace variable_us = "" if variablename=="5. Combination of levels" global modelnames_us = "Base Officelevel Officetype Electiontype Campaign Time Femalerepresentation" global Base = "" global Officelevel = "lev3 lev4 lev5" global Officetype = "legi2 legi3" global Electiontype = "elec2 elec3" global Campaign = "rou2 rou3" global Time = "midtime" global Femalerepresentation = "femalerepresentation" foreach model of global modelnames_us { robumeta vis_d $`model', $w1 matrixresults local ivcount = 1 foreach dummy of global `model' { replace coefficient_us = bmat[1,`ivcount'] if variable_us=="`dummy'" & model=="`model'" replace se_us = (vmat[`ivcount',`ivcount'])^.5 if variable_us=="`dummy'" & model=="`model'" replace dfs_us = dfmat[1,`ivcount'] if variable_us=="`dummy'" & model=="`model'" local ivcount = `ivcount' + 1 } replace coefficient_us = bmat[1,`ivcount'] if variable_us=="_cons" & model=="`model'" replace se_us = (vmat[`ivcount',`ivcount'])^.5 if variable_us=="_cons" & model=="`model'" replace dfs_us = dfmat[1,`ivcount'] if variable_us=="_cons" & model=="`model'" } * scatter vis_d femalerepresentation if region==1 scatter femalerepresentation midtime if region==1