⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 streg.dlg

📁 是一个经济学管理应用软件 很难找的 但是经济学学生又必须用到
💻 DLG
字号:
/*
  streg

*! VERSION 1.1.2  13mar2005

*/

VERSION 9.0

INCLUDE _std_large
INCLUDE _ht330
INCLUDE header

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

DIALOG main, label("streg - Fit parametric survival model") tabtitle("Model")
BEGIN
  DEFINE _x _xsetbu
  DEFINE _y _top
  INCLUDE _bu_stset

  TEXT     tx_iv     _lft      _topph     _cwd1    .,			/*
		*/ label("Independent variables:")			/*
		*/
  VARLIST  vl_iv     _lft      _ss       _iwd      .,			/*
		*/ label("Independent variables")			/*
		*/
  CHECKBOX ck_nocons @         _ms       @         .,			/*
  		*/label("Suppress constant term") option(noconstant)

  GROUPBOX gb_model  _lft      _ls       _iwd      _ht6,		/*
		*/ label("Survival distribution")			/*
		*/
  RADIO    rb_exp    _indent   _ss       _cwd2     .,			/*
		*/ label("Exponential")					/*
		*/ clickon("script exp")				/*
		*/ first						/*
		*/ option("dist(exponential)")				/*
		*/
  RADIO    rb_weib   _lft2     @         @         .,			/*
		*/ label("Weibull")					/*
		*/ clickon("script weib")				/*
		*/ option("dist(weibull)")				/*
		*/
  RADIO    rb_gomp   _ilft     _ss       @         .,			/*
		*/ label("Gompertz")					/*
		*/ clickon("script gomp")				/*
		*/ option("dist(gompertz)")				/*
		*/
  RADIO    rb_logn   _lft2     @         @         .,			/*
		*/ label("Log normal")					/*
		*/ clickon("script logn")				/*
		*/ option("dist(lognormal)")				/*
		*/
  RADIO    rb_logl   _ilft     _ss       @         .,			/*
		*/ label("Log logistic")				/*
		*/ clickon("script logl")				/*
		*/ option("dist(loglogistic)")				/*
		*/
  RADIO    rb_gamma  _lft2     @         @         .,			/*
		*/ label("Generalized gamma")				/*
		*/ clickon("script gamma")				/*
		*/ last							/*
		*/ option("dist(gamma)")				/*
		*/

  CHECKBOX ck_frailty _lft     _xls      _iwd      _ht2,		/*
		*/ label("Frailty distribution")			/*
		*/ groupbox						/*
		*/ clickon("script frailty_on")				/*
		*/ clickoff("script frailty_off")			/*
		*/
  RADIO    rb_fgamma _indent   _ss       _cwd2     .,			/*
		*/ label("Gamma")					/*
		*/ first						/*
		*/ option("frailty(gamma)")				/*
		*/
  RADIO    rb_figaus _lft2     @         @         .,			/*
		*/ label("Inverse-Gaussian")				/*
		*/ last							/*
		*/ option("frailty(invgaussian)")			/*
		*/

  CHECKBOX ck_time   _lft      _xls      _cwd1     .,			/*
		*/ label("Use accelerated failure-time metric")		/*
		*/ clickon("program time_tr_pr")			/*
		*/ clickoff("program time_tr_pr")			/*
		*/ option("time")					/*
		*/
END

SCRIPT PREINIT
BEGIN
	script se_createAsJknifeBstrapML
END

PROGRAM check4shared
BEGIN
	if !main.ck_frailty {
		model2.tx_shared.disable
		model2.vn_shared.disable
	}
	call program shared_on
END

SCRIPT frailty_on
BEGIN
	main.rb_fgamma.enable
	main.rb_figaus.enable
	model2.tx_strata.disable
	model2.vn_strata.disable
	program check4shared
	model2.tx_anc.disable
	model2.vl_anc.disable
	model2.tx_anc2.disable
	model2.vl_anc2.disable
	rpt.ck_nolr.enable
END

SCRIPT frailty_off
BEGIN
	main.rb_fgamma.disable
	main.rb_figaus.disable
	model2.tx_strata.enable
	model2.vn_strata.enable
	program check4shared
	program ancillary_pr
	rpt.ck_nolr.disable
END

SCRIPT ancillary_pr
BEGIN
	if main.rb_exp {
		script exp
	}
	if main.rb_weib {
		script weib
	}
	if main.rb_gomp {
		script comp
	}
	if main.rb_logn {
		script logn
	}
	if main.rb_logl {
		script logl
	}
	if main.rb_gamma {
		script gamma
	}
END

PROGRAM time_tr_pr
BEGIN
	if main.rb_logl | main.rb_logn | main.rb_gamma {
		call gaction main.ck_time.disable
		call gaction rpt.ck_tr.enable
	}
	if main.rb_exp | main.rb_weib {
		call gaction main.ck_time.enable
		if main.ck_time {
			call gaction rpt.ck_tr.disable
		}
		if ! main.ck_time {
			call gaction rpt.ck_tr.enable
		}
	}
	if main.rb_gomp {
		call gaction main.ck_time.disable
		call gaction rpt.ck_tr.disable
	}
END

SCRIPT exp
BEGIN
	rpt.ck_nohr.enable
	program time_tr_pr
	program shared_on
	model2.tx_anc.disable
	model2.vl_anc.disable
	model2.tx_anc2.disable
	model2.vl_anc2.disable
END

SCRIPT weib
BEGIN
	rpt.ck_nohr.enable
	program time_tr_pr
	program shared_on
	model2.tx_anc.enable
	model2.vl_anc.enable
	model2.tx_anc2.disable
	model2.vl_anc2.disable
END

SCRIPT gomp
BEGIN
	rpt.ck_nohr.enable
	program time_tr_pr
	program shared_on
	model2.tx_anc.enable
	model2.vl_anc.enable
	model2.tx_anc2.disable
	model2.vl_anc2.disable
END

SCRIPT logn
BEGIN
	rpt.ck_nohr.disable
	program time_tr_pr
	program shared_on
	model2.tx_anc.enable
	model2.vl_anc.enable
	model2.tx_anc2.disable
	model2.vl_anc2.disable
END

SCRIPT logl
BEGIN
	rpt.ck_nohr.disable
	program time_tr_pr
	program shared_on
	model2.tx_anc.enable
	model2.vl_anc.enable
	model2.tx_anc2.disable
	model2.vl_anc2.disable
END

SCRIPT gamma
BEGIN
	rpt.ck_nohr.disable
	program time_tr_pr
	program shared_off
	model2.tx_anc.enable
	model2.vl_anc.enable
	model2.tx_anc2.enable
	model2.vl_anc2.enable
END

PROGRAM shared_off
BEGIN
	call gaction model2.tx_shared.disable
	call gaction model2.vn_shared.disable
END

PROGRAM shared_on
BEGIN
	if main.ck_frailty & ! main.rb_gamma {
		call gaction model2.tx_shared.enable
		call gaction model2.vn_shared.enable
	}
END

DIALOG model2, tabtitle("Model 2")
BEGIN
  GROUPBOX gb_opts   _lft      _top      _iwd      _ht25,		/*
  		*/ label("Options")
  TEXT     tx_strata _ilft     _ms       _cwd3_2   .,			/*
		*/ label("Strata ID variable:")				/*
		*/
DEFINE y @y
  VARNAME  vn_strata @         _ss       @         .,			/*
		*/ label("Strata ID variable")				/*
		*/ option("strata")					/*
		*/

  TEXT     tx_offset _ilft3_2   y        @         .,			/*
  		*/label("Offset variable:")
  VARNAME  vn_offset @         _ss       @         .,			/*
  		*/label("Offset variable") option(offset)

  TEXT     tx_shared _ilft     _ls       _cwd2     .,			/*
		*/ label("Shared frailty ID variable:")			/*
		*/
  VARNAME  vn_shared @         _ss       _cwd3_2   .,			/*
		*/ label("Shared frailty ID variable")			/*
		*/ option("shared")					/*
		*/

  TEXT     tx_anc    _ilft     _ls       _ibwd     .,			/*
		*/ label("Independent variables to model the first ancillary parameter:")/*
		*/
  VARLIST  vl_anc    @         _ss       @         .,			/*
		*/ label("Model variables for first ancillary parameter")/*
		*/ option("ancillary")					/*
		*/
  TEXT     tx_anc2   @         _ls       @         .,			/*
		*/ label("Independent variables to model the second ancillary parameter:")/*
		*/
  VARLIST  vl_anc2   @         _ss       @         .,			/*
		*/ label("Model variables for second ancillary parameter")/*
		*/ option("anc2")					/*
		*/

  DEFINE _x _ilft
  DEFINE _cx _ibwd
  DEFINE _y _ls
  INCLUDE _constraints

END

INCLUDE byifin
INCLUDE se

DIALOG rpt, tabtitle("Reporting")
BEGIN
  DEFINE _x _lft
  DEFINE _cx _spr2
  DEFINE _y _top
  INCLUDE _sp_level
  DEFINE y @y

  CHECKBOX ck_nohr   _lft      _ls       _cwd0     .,			/*
		*/ label("Do not report hazard ratios")			/*
		*/ option("nohr")					/*
		*/
  CHECKBOX ck_tr     @         _ms       @         .,			/*
		*/ label("Report time ratios")				/*
		*/ option("tr")						/*
		*/
  CHECKBOX ck_noshow @         _ms       @         .,			/*
		*/ label("Do not report st variable descriptions")	/*
		*/ option("noshow")					/*
		*/
  CHECKBOX ck_nohead @         _ms       @         .,			/*
  		*/label("Do not display output header") option(noheader)
  CHECKBOX ck_nolr   @         _ms       @         .,			/*
  		*/label("Do not perform likelihood-ratio test")		/*
  		*/option("nolrtest")

END

INCLUDE max_ml

PROGRAM command
BEGIN
	allowxi
	INCLUDE _by_pr
	put "streg "
	varlist [main.vl_iv]
	INCLUDE _ifin_pr
	beginoptions
		option main.ck_nocons
		option radio(main rb_exp rb_weib rb_gomp rb_logn rb_logl rb_gamma)
		if main.ck_frailty {
			option radio(main rb_fgamma rb_figaus)
		}
		option main.ck_time
		optionarg model2.vn_strata
		optionarg model2.vn_offset
		optionarg model2.vn_shared
		optionarg model2.vl_anc
		optionarg model2.vl_anc2
		optionarg model2.cb_constr

		put " " /program se_output

		optionarg /hidedefault rpt.sp_level
		option rpt.ck_nohr
		option rpt.ck_tr
		option rpt.ck_noshow
		option rpt.ck_nohead
		option rpt.ck_nolr
		put " " /program max_output
	endoptions
END

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -