program midas_examples
	version 10.0
	`1'
end

program define midas_example_results
	preserve
	di ""
	use http://repec.org/nasug2007/midas_example_data.dta, clear
	di in wh ""
	di ". midas tp fp fn tn, es(x) res(all)"

	midas tp fp fn tn, es(x) res(all)
	restore
end

program define midas_example_table
	preserve
	di ""
	 use http://repec.org/nasug2007/midas_example_data.dta, clear
	di in wh ""
	di ". midas tp fp fn tn,"
	di " es(x) table(dlr)"

	midas tp fp fn tn, es(x) table(dlr)
	restore
end

program define midas_example_srocellip
	preserve
	di ""
	 use http://repec.org/nasug2007/midas_example_data.dta, clear
	di in whi ""
	di ". midas tp fp fn tn, es(x) plot sroc2"

	midas tp fp fn tn, es(x) plot sroc2
     restore
end

program define midas_example_pubbias
	preserve
	di ""
	 use http://repec.org/nasug2007/midas_example_data.dta, clear
	di in whi ""
	di ". midas tp fp fn tn, pubbias"

     midas tp fp fn tn, pubbias
	restore
end

program define midas_example_funnel
	preserve
	di ""
	 use http://repec.org/nasug2007/midas_example_data.dta, clear
	di in whi ""
	di ". midas tp fp fn tn, fun"

     midas tp fp fn tn, fun
	restore
end

program define midas_example_forest1
	preserve
	di ""
	 use http://repec.org/nasug2007/midas_example_data.dta, clear
	di in whi ""
	di ". midas tp fp fn tn, "
	di "> id(author) year(year) ms(0.75)"
	di "> for(dss) es(x) texts(0.80)"

	midas tp fp fn tn, ///
	id(author) year(year) ms(0.75) for(dss) es(x) texts(0.80)
	restore
end

program define midas_example_forest2
	preserve
	di ""
	 use http://repec.org/nasug2007/midas_example_data.dta, clear
	di in whi ""
	di ". midas tp fp fn tn, id(author) year(year)"
	di "> es(x) ms(0.75) ford for(dss) "


	midas tp fp fn tn, id(author) year(year) es(x) ms(0.75) ford for(dss)
     restore
end

program define midas_example_forest3
	preserve
	di ""
	 use http://repec.org/nasug2007/midas_example_data.dta, clear
	di in whi ""
	di ". midas tp fp fn tn, id(author) year(year) ms(0.75)"
	di "> for(dss) ford es(x) test(Forest Plot for"
     di "> Axillary PET in Breast Cancer) vsize(15)"


	midas tp fp fn tn, id(author) year(year) ms(0.75) ///
     for(dss) ford es(x) test(Forest Plot for Axillary PET in Breast Cancer) vsize(15)
     restore
end


program define midas_example_fagan
	preserve
	di ""
	 use http://repec.org/nasug2007/midas_example_data.dta, clear
	di in whi ""
	di ". midas tp fp fn tn, es(x) fagan prior(0.20)"


	midas tp fp fn tn, es(x) fagan prior(0.20)
     restore
end

program define midas_example_lrmatrix
	preserve
	di ""
	 use http://repec.org/nasug2007/midas_example_data.dta, clear
	di in whi ""
	di ". midas tp fp fn tn, es(x) lrmat"


     midas tp fp fn tn, es(x) lrmat
	restore
end

program define midas_example_bivbox
	preserve
	di ""
	 use http://repec.org/nasug2007/midas_example_data.dta, clear
	di in whi ""
	di ". midas tp fp fn tn, bivbox scheme(s2color)"


     midas tp fp fn tn, bivbox scheme(s2color)
	restore
end

program define midas_example_chi
	preserve
	di ""
	 use http://repec.org/nasug2007/midas_example_data.dta, clear
	di in whi ""
	di ". midas tp fp fn tn, chip scheme(s2color)"


     midas tp fp fn tn, chip scheme(s2color)
	restore
end

program define midas_example_pddamp
	preserve
	di ""
	 use http://repec.org/nasug2007/midas_example_data.dta, clear
	di in whi ""
	di ". midas tp fp fn tn, pddam(p) hsize(6) scheme(s2color)"
     di "> test(Conditional Probability Plot for"
     di "> Axillary PET in Breast Cancer) vsize(15)"

     midas tp fp fn tn, es(x) pddam(p) hsize(6) scheme(s2color) ///
     test(Conditional Probability Plot for Axillary PET in Breast Cancer) vsize(15)"
	restore
end

program define midas_example_pddamr
	preserve
	di ""
	 use http://repec.org/nasug2007/midas_example_data.dta, clear
	di in whi ""
	di ". midas tp fp fn tn, es(x) pddam(r)"

     midas midas tp fp fn tn, es(x) pddam(r)
	restore
end

program define midas_example_quadas
	preserve
	di ""
	 use http://repec.org/nasug2007/midas_example_data.dta, clear
	di in whi ""
	di ""
	di ". midas tp fp fn tn prodesign ssize30 fulverif testdescr"
	di "> refdescr subjdescr report brdspect blinded, qualib"

	midas tp fp fn tn prodesign ssize30 fulverif testdescr ///
     refdescr subjdescr report brdspect blinded, qualib
	restore
end

program define midas_example_midareg
	preserve
	di ""
	 use http://repec.org/nasug2007/midas_example_data.dta, clear
	di in whi ""
	di ""
	di ". midas tp fp fn tn prodesign ssize30 fulverif testdescr"
	di "> refdescr subjdescr report brdspect blinded, es(x) covars"

	midas tp fp fn tn prodesign ssize30 fulverif testdescr ///
     refdescr subjdescr report brdspect blinded, es) covars
	restore
end