/*
	predict (after mca)

*!  VERSION 1.0.0  07feb2007

*/

VERSION 10.0

INCLUDE _std_medium
INCLUDE header

HELP hlp1, view("help mca postestimation")
RESET res1

DIALOG main, label("predict - Prediction after estimation") tabtitle("Main")
BEGIN
  INCLUDE _p_gentype

  GROUPBOX gb_produce		_lft	_ls	_iwd	_ht6,		///
	label("Produce:")
  RADIO    rb_rowscore 		_ilft	_ss	_ibwd	.,		///
	option(rowscore) label("Row scores") first
  RADIO    rb_score		_ilft	_ss	_ibwd	.,	last	///
  	onclickon(main.ed_score.enable)					///
  	onclickoff(main.ed_score.disable)				///
	label("Compute scores for this variable:") 
  EDIT     ed_score	       _indent2	_ss	_vnwd	.,		///
	option(score) label("Compute scores for this variable ")
END

SCRIPT POSTINIT
BEGIN
	script _p_gentype_setMedium
	script _p_gentype_multiple
END

INCLUDE _p_gentype_sc
INCLUDE ifin
INCLUDE _type_list_fd

DIALOG opt, tabtitle("Options")
BEGIN
  RADIO    rb_dim		_lft	_top	_iwd	.,		///
label("Compute scores for dimensions 1 to k (number of new variables)") ///
	first 
  RADIO    rb_dim2		@	_ss	_iwd	.,		///
	onclickon(opt.en_dim.enable) onclickoff(opt.en_dim.disable)	///
	label("Compute scores for these dimensions:") last
  EDIT     en_dim		_ilft   _ss      _en7wd .,		///
	option(dim) label("Compute scores for these dimensions")
  RADIO    rb_norm1		_lft 	_xls	_iwd	.,		///
	label("Use default normalization (from -mca- estimation).") first
  RADIO	   rb_norms		_lft	_ss	_iwd	.,		///
	label("Use standard normalization") option(normalize(standard))
  RADIO    rb_normp		_lft	_ss	_iwd	.,		///
	label("Use principal normalization") option(normalize(principal)) last
END

PROGRAM command
BEGIN
	put "predict "
	put " " /program _p_gentype_output
	INCLUDE _ifin_pr
	beginoptions
		option main.rb_rowscore
		if main.rb_score {
			require main.ed_score
			optionarg main.ed_score
		}
		if opt.rb_dim2 {
			require opt.en_dim
			optionarg opt.en_dim
		}
		if opt.rb_norms {
			put " normalize(standard)"
		}
		if opt.rb_normp {
			put " normalize(principal)"
		}
	endoptions
END
