Have been trying to use collect export to ouput the kmatch summary statistics to an excel file but I keep getting an error that nothing has been specified. Not sure where to go from here. I've also been trying to get the same graphs by year but all the graphs are the same. Any help appreciated
kmatch md $txvar $match_vars_sch (zesci), over(year) ematch($exact_vars_st) att ebalance targets(1) wgen replace
keep if _W_ATT > 0 & _W_ATT < .
collect export myfile as(xlsx): kmatch summarize
mat M = r(M)
mat V = r(V)/*coefplot matrix(M[,3]) matrix(M[,6]) || matrix(V[,3]) matrix(V[,6]) || , ///
bylabels("Std. mean difference" "Variance ratio") ///
noci nolabels byopts(xrescale) ///
legend(order(1 "Raw" 2 "Matched"))
graph save "Graph" "S:\MAT\Year 11\Results\y2014_match.gph", replace
graph save "Graph" "S:\MAT\Year 11\Results\y2015_match.gph", replace
graph save "Graph" "S:\MAT\Year 11\Results\y2016_match.gph", replace
graph save "Graph" "S:\MAT\Year 11\Results\y2017_match.gph", replace
graph save "Graph" "S:\MAT\Year 11\Results\y2019_match.gph", replace
graph save "Graph" "S:\MAT\Year 11\Results\y2022_match.gph", replace
graph save "Graph" "S:\MAT\Year 11\Results\y2023_match.gph", replace
graph save "Graph" "S:\MAT\Year 11\Results\y2024_match.gph", replace*/
kmatch md $txvar $match_vars_sch (zesci), over(year) ematch($exact_vars_st) att ebalance targets(1) wgen replace
keep if _W_ATT > 0 & _W_ATT < .
collect export myfile as(xlsx): kmatch summarize
mat M = r(M)
mat V = r(V)/*coefplot matrix(M[,3]) matrix(M[,6]) || matrix(V[,3]) matrix(V[,6]) || , ///
bylabels("Std. mean difference" "Variance ratio") ///
noci nolabels byopts(xrescale) ///
legend(order(1 "Raw" 2 "Matched"))
graph save "Graph" "S:\MAT\Year 11\Results\y2014_match.gph", replace
graph save "Graph" "S:\MAT\Year 11\Results\y2015_match.gph", replace
graph save "Graph" "S:\MAT\Year 11\Results\y2016_match.gph", replace
graph save "Graph" "S:\MAT\Year 11\Results\y2017_match.gph", replace
graph save "Graph" "S:\MAT\Year 11\Results\y2019_match.gph", replace
graph save "Graph" "S:\MAT\Year 11\Results\y2022_match.gph", replace
graph save "Graph" "S:\MAT\Year 11\Results\y2023_match.gph", replace
graph save "Graph" "S:\MAT\Year 11\Results\y2024_match.gph", replace*/