/*
	manova_estat

*!  VERSION 1.0.2  01jun2009

*/

VERSION 11.0

INCLUDE _std_large
DEFINE _dlght 400
INCLUDE header

HELP hlp1, view("help estat")
RESET res1

SCRIPT PREINIT
BEGIN
	create BOOLEAN has_FactorVars
	has_FactorVars.settrue
	program sum_bu_facvars_ckResults
	program vce_bu_facvars_ckResults
END

DIALOG main, label("estat - Postestimation statistics") tabtitle("Main")
BEGIN
  TEXT     tx_subcmd		_lft	_top	300	.,		///
  	label("Reports and statistics: (subcommand)")
  LISTBOX  lb_subcmd		@	_ss	@	55,		///
  	contents(main_subcommand_contents)				///
  	values(main_subcommand_values)					///
  	onselchangelist(main_subcommand_scripts)

  DEFINE holdy 95

  INCLUDE estat_sum
  INCLUDE estat_vce
  INCLUDE _estat_bootstrap
END

INCLUDE estat_sum_pr
INCLUDE _estat_bootstrap_pr
INCLUDE estat_vce_pr

LIST main_subcommand_contents
BEGIN
 	 "Summarize estimation sample (summarize)"
 	 "Covariance matrix estimates (vce)"
END

LIST main_subcommand_values
BEGIN
	summarize
	vce
END

LIST main_subcommand_scripts
BEGIN
	script sel_summarize
	script sel_vce
END

SCRIPT sel_summarize
BEGIN
	script main_hide_all
	program main_summ_on
END

SCRIPT sel_vce
BEGIN
	script main_hide_all
	program vce_on
END

SCRIPT main_hide_all  // MUST BE IMPLEMENTED FOR BOOTSTRAP
BEGIN
	program vce_off
	script main_summ_off
	script main_bootstrap_hide
END

PROGRAM vl_output
BEGIN
	put main.vl_spec
END

PROGRAM vl_eq_output
BEGIN
	put main.vl_eq
END

PROGRAM command
BEGIN
	put "estat "
	put main.lb_subcmd

	put " " /program summarize_output

	beginoptions
		// Summarize options
		put " " /program summarize_opts_output

		put " " /program vce_output
		put " " /program bootstrap_output
	endoptions
END
