/*
  ttesti

*!  VERSION 1.0.4  04apr2007

  Two sample immediate t-test.

*/

VERSION 8.0

INCLUDE _std_medium
INCLUDE _ht240
INCLUDE header

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

DIALOG main, label("ttesti - Two-sample mean-comparison test calculator") /*
		*/ tabtitle("Main")					/*
		*/
BEGIN
  /*--+----1----+----2----+----3----+----4----+----5----+----6----+----7----+*/
  FRAME    fr_sam1   _lft3_02  _top      _cwd3_02  _ht8,		/*
		*/ label("")						/*
		*/
  FRAME    fr_sam2   _lft3_03  @         _cwd3_03  @,			/*
		*/ label("")						/*
		*/
  TEXT     tx_sam1   _ilft3_2  @         _cwd3_2   .,			/*
		*/ label("Sample 1")					/*
		*/ center						/*
		*/
  TEXT     tx_sam2   _ilft3_3  @         _cwd3_2   .,			/*
		*/ label("Sample 2")					/*
		*/ center						/*
		*/

  FRAME    fr_rows   _lft      _ss       _iwd      _ht6,		/*
		*/ label("")						/*
		*/
  TEXT     tx_size   _ilft     _indent   _cwd3_1   .,			/*
		*/ label("Size")					/*
		*/
  SPINNER  sp_size1  _ilft3_2  @         _cwd3_2   .,			/*
		*/ label("Size for sample 1")				/*
		*/ min(1) max(1000000000)				/*
		*/ default(1)
  SPINNER  sp_size2  _ilft3_3  @         _cwd3_2   .,			/*
		*/ label("Size for sample 2")				/*
		*/ min(1) max(1000000000)				/*
		*/ default(1)

  TEXT     tx_mean   _ilft     _ms       _cwd3_1   .,			/*
		*/ label("Mean")					/*
		*/
  EDIT     en_mean1  _ilft3_2  @         _cwd3_2   .,			/*
		*/ label("Mean for sample 1")				/*
		*/ numonly						/*
		*/
  EDIT     en_mean2  _ilft3_3  @         _cwd3_2   .,			/*
		*/ label("Mean for sample 2")				/*
		*/ numonly						/*
		*/

  TEXT     tx_sd     _ilft     _ms       _cwd3_1   .,			/*
		*/ label("Std. dev.")					/*
		*/
  EDIT     en_sd1    _ilft3_2  @         _cwd3_2   .,			/*
		*/ label("Std. dev. for sample 1")			/*
		*/ numonly						/*
		*/
  EDIT     en_sd2    _ilft3_3  @         _cwd3_2   .,			/*
		*/ label("Std. dev. for sample 2")			/*
		*/ numonly						/*
		*/

  DEFINE _x _lft
  DEFINE _cx _spr
  DEFINE _y _xxls
  INCLUDE _sp_level

  CHECKBOX ck_uneq   _lft      +35       _iwd     .,	    		/*
		*/ label("Unequal variances")				/*
		*/ clickon("gaction main.ck_welch.enable")		/*
		*/ clickoff("gaction main.ck_welch.disable")		/*
		*/ option("unequal")					/*
		*/
  CHECKBOX ck_welch     @      _ms          @     .,			/*
		*/ label("Welch's approximation")			/*
		*/ option("welch")					/*
		*/

END

PROGRAM command
BEGIN
	require main.en_mean1 main.en_sd1
	require main.en_mean2 main.en_sd2
	put "ttesti "
	put main.sp_size1
	put " "
	put main.en_mean1
	put " "
	put main.en_sd1
	put " "
	put main.sp_size2
	put " "
	put main.en_mean2
	put " "
	put main.en_sd2
	beginoptions
		option main.ck_uneq
		option main.ck_welch
		INCLUDE _level_main_pr
	endoptions
END

