/*
	Include file that does all the work for predict
	(after gompertz, weibull, or ereg with no het.)

*!  VERSION 1.1.2  28mar2005

*/

INCLUDE _std_large  // ** set POSTINIT to match
INCLUDE header

SCRIPT main_POSTINIT
BEGIN
	script _p_gentype_setLarge
END

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

  GROUPBOX gb_opts           _lft      _ls       _iwd      _ht12,	/*
		*/ label("Produce:")
  RADIO    rb_medtime        _indent   _ss       _cwd2     ., first	/*
		*/ option(median time)					/*
		*/ onclickon(script _p_gentype_single)			/*
		*/ label("Predicted median survival time")
  DEFINE   holdy @y
  RADIO    rb_medlntime      @         _ss       @         .,		/*
		*/ option(median lntime)				/*
		*/ onclickon(script _p_gentype_single)			/*
		*/ label("Predicted median ln(survival time)")
  RADIO    rb_meantime       @         _ss       @         .,		/*
		*/ option(mean time)					/*
		*/ onclickon(script _p_gentype_single)			/*
		*/ label("Predicted mean survival time")
  RADIO    rb_meanlntime     @         _ss       @         .,		/*
		*/ option(mean lntime)					/*
		*/ onclickon(script _p_gentype_single)			/*
		*/ label("Predicted mean ln(survival time)")
  RADIO    rb_hazard         @         _ss       @         .,		/*
		*/ option(hazard)					/*
		*/ onclickon(script _p_gentype_single)			/*
		*/ label("Predicted hazard")
  RADIO    rb_hr             @         _ss       @         .,		/*
		*/ option(hr)						/*
		*/ onclickon(script _p_gentype_single)			/*
		*/ label("Predicted hazard ratio")

  RADIO    rb_xb             _lft2     holdy     @         .,		/*
		*/ option(xb)						/*
		*/ onclickon(script _p_gentype_single)			/*
		*/ label("Linear prediction")
  RADIO    rb_stdp           @         _ss       @         .,		/*
		*/ option(stdp)						/*
		*/ onclickon(script _p_gentype_single)			/*
		*/ label("Std. error of the linear prediction")
  RADIO    rb_surv           @         _ss       @         .,		/*
		*/ option(surv)						/*
		*/ onclickon(script _p_gentype_single)			/*
		*/ label("Predicted S(depvar) or S(depvar|t0)")
  RADIO    rb_csnell         @         _ss       @         .,		/*
		*/ option(csnell)					/*
		*/ onclickon(script _p_gentype_single)			/*
		*/ label("(Partial) Cox-Snell residuals")
  RADIO    rb_mgale          @         _ss       @         .,		/*
		*/ option(mgale)					/*
		*/ onclickon(script _p_gentype_single)			/*
		*/ label("Cumul. martingale-like residuals")
  RADIO    rb_score          @         _ss       @         ., last	/*
		*/ option(score)					/*
		*/ onclickon(script _p_gentype_multiple)		/*
		*/ label("Equation-level scores")
END

INCLUDE _p_gentype_sc
INCLUDE ifin
INCLUDE _type_list_fd

PROGRAM command
BEGIN
	put "predict "
	put " " /program _p_gentype_output
	INCLUDE _ifin_pr
	beginoptions
		option radio(main rb_medtime rb_medlntime rb_meantime /*
				*/ rb_meanlntime rb_hazard rb_hr rb_xb /*
				*/ rb_stdp rb_surv rb_csnell rb_mgale rb_score)
	endoptions
END
