/*
	as_probit_int.idlg

	This is an INCLUDE file for the -model- and -model2- dialogs that go 
	with -asmprobit- and -asroprobit-.

*!  VERSION 1.1.1  09feb2009

	// SCRIPTS and PROGRAMS for external use
	    * PROGRAM int_output

*/

DIALOG int, tabtitle("Integration")
BEGIN
  GROUPBOX gb_int		_lft	_top	_iwd		_ht25h,	///
  	label("Integration options for simulating likelihood")

  GROUPBOX gb_method		_ilft   _ms	_cwd1		_ht6,	///
  	label("Type of quasi- or pseudouniform sequence")
  DEFINE y @y
  RADIO	   rb_hammersley	_indent	_ss	_inwd		.,	///
	label("Hammersley sequence") first option(NONE)			///
	onclickon(script int_random_off)
  RADIO    rb_halton		@	_ss	@		.,	///
	label("Halton sequence")					///
	option(intmethod(halton)) onclickon(script int_random_off)
  RADIO	   rb_random		@	_ss	@		.,	///
	label("Uniform pseudorandom sequence") last 			///
	option(intmethod(random)) onclickon(script int_random_on)

  GROUPBOX gb_favor		_lft2   y	_cwd2		_ht6,	///
  	label("Favor")
  RADIO	   rb_speed		_ilft2	_ss	_inwd		.,	///
	label("Speed") first option(NONE)			
  RADIO    rb_space		@	_ss	@		.,	///
	label("Space") last option(favor(space)) 

  CHECKBOX ck_intpoints		_ilft	_xxxls	_ibwd		.,	///
  	onclickon(script int_intpoints_on)				///
  	onclickoff(script int_intpoints_off)				///
  	label("Override the default number of points used in quasi- or pseudouniform sequence")
  EDIT     ed_intpoints		_indent2 _ss	_en7wd		.,	///
  	numonly option(intpoints) label("Points")
  TEXT     tx_intpoints		_en7sep	@	100		.,	///
  	label("Points")

  CHECKBOX ck_intburn		_ilft	_ls	_ibwd		.,	///
  	onclickon(script int_intburn_on)				///
  	onclickoff(script int_intburn_off)				///
  	label("Override the default burn-in index in the quasiuniform sequence")
  DEFINE y @y
  EDIT     ed_intburn		_indent2 _ss	_en7wd		.,	///
  	numonly option(intburn) label("Index")
  TEXT     tx_intburn		_en7sep	@	100		.,	///
  	label("Index")

  CHECKBOX ck_intseed		_ilft	y	_ibwd		.,	///
  	onclickon(script int_intseed_on)				///
  	onclickoff(script int_intseed_off)				///
  	label("Set seed to use for generating the uniform sequence")
  EDIT     ed_intseed		_indent2 _ss	_en7wd		.,	///
  	numonly option(intseed) label("Seed")
  TEXT     tx_intseed		_en7sep	@	100		.,	///
  	label("Seed")

  CHECKBOX ck_antithetics	_ilft	_ls	_ibwd		.,	///
  	option(antithetics)						///
  	label("Use antithetic draws")

  CHECKBOX ck_nopivot		_ilft	_ls	_ibwd		.,	///
  	option(nopivot)							///
  	label("Turn off integration interval pivoting")

  GROUPBOX gb_additionalmax	_lft	_xls	_iwd		_ht4,	///
  	label("Additional maximization options")
  CHECKBOX ck_initbhhh		_ilft	_ss	_inwd		.,	///
  	onclickon(script int_initbhhh_on) 				///
  	onclickoff(script int_initbhhh_off)				///
  	label("Use the BHHH optimization algorithm for the first # iterations")
  EDIT     ed_initbhhh		_indent2 _ss	_en7wd		.,	///
  	label("Iterations") option(initbhhh)
  TEXT     tx_initbhhh		_en7sep	@	100		.,	///
  	label("Iterations")
END

SCRIPT int_random_off
BEGIN
	int.ck_intburn.show
	int.ed_intburn.show
	int.tx_intburn.show
	int.ck_intseed.hide
	int.ed_intseed.hide
	int.tx_intseed.hide
END

SCRIPT int_random_on
BEGIN
	int.ck_intseed.show
	int.ed_intseed.show
	int.tx_intseed.show
	int.ck_intburn.hide
	int.ed_intburn.hide
	int.tx_intburn.hide
END

SCRIPT int_intburn_on
BEGIN
	int.ed_intburn.enable
	int.tx_intburn.enable
END

SCRIPT int_intburn_off
BEGIN
	int.ed_intburn.disable
	int.tx_intburn.disable
END

SCRIPT int_intseed_on
BEGIN
	int.ed_intseed.enable
	int.tx_intseed.enable
END

SCRIPT int_intseed_off
BEGIN
	int.ed_intseed.disable
	int.tx_intseed.disable
END

SCRIPT int_intpoints_on
BEGIN
	int.ed_intpoints.enable
	int.tx_intpoints.enable
END

SCRIPT int_intpoints_off
BEGIN
	int.ed_intpoints.disable
	int.tx_intpoints.disable
END

SCRIPT int_initbhhh_on
BEGIN
	int.ed_initbhhh.enable
	int.tx_initbhhh.enable
END

SCRIPT int_initbhhh_off
BEGIN
	int.ed_initbhhh.disable
	int.tx_initbhhh.disable
END

PROGRAM int_output
BEGIN
	option int.rb_halton
	option int.rb_random
	if int.ck_intpoints {
		require int.ed_intpoints
		optionarg int.ed_intpoints
	}
	if int.ck_intburn {
		require int.ed_intburn
		optionarg int.ed_intburn
	}
	if int.ck_intseed {
		require int.ed_intseed
		optionarg int.ed_intseed
	}
	option int.ck_antithetics
	option int.ck_nopivot
	if int.ck_initbhhh {
		require int.ed_initbhhh
		optionarg int.ed_initbhhh
	}
	option int.rb_space
END
