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

📄 stepwise.dlg

📁 是一个经济学管理应用软件 很难找的 但是经济学学生又必须用到
💻 DLG
📖 第 1 页 / 共 2 页
字号:

SCRIPT stcox_on
BEGIN
	script main_no_depvars
	script model2_lr_on
	script model2_dist_off
	script model2_group_off
	script model2_cens_off
	script model2_disp_off
	script model2_quant_off
	script model2_llul_off
	script rpt_nohr_on
END

SCRIPT streg_on
BEGIN
	script main_no_depvars
	script model2_lr_on
	script model2_dist_on
	script model2_group_off
	script model2_cens_off
	script model2_disp_off
	script model2_quant_off
	script model2_llul_off
	script rpt_nohr_on
END

SCRIPT tobit_on
BEGIN
	script main_one_depvar
	script model2_lr_on
	script model2_group_off
	script model2_cens_off
	script model2_disp_off
	script model2_quant_off
	script model2_llul_on
	script rpt_eform_off
END

DIALOG model2, tabtitle("Model 2")
BEGIN
  CHECKBOX ck_forward _lft     _top      _cwd1     .,			///
	label("Perform forward-stepwise selection")			///
	option(forward)
  CHECKBOX ck_hier   @         _ms       @         .,			///
	label("Perform hierarchical selection")				///
	option(hierarchical)
  CHECKBOX ck_lock1  @         _ms       @         .,			///
	label("Keep the first term")					///
	option(lockterm1)

  GROUPBOX gb_selstat _lft2    _top      _cwd1     _ht4,		///
  	label("Stepwise test statistic")
  RADIO    rb_wald   _indent   _ss       _inwd     .,			///
	label("Wald (default)") option(NONE) first
  RADIO    rb_lr     @         _ss       @         .,			///
	label("Likelihood ratio") option(lr) last

  DEFINE holdx _lft
  DEFINE holdy _ht6h

  // CLOGIT
  TEXT     tx_group  holdx     holdy     _iwd      .,			///
	label("Group variable (required):")
  VARNAME  vn_group  @         _ss       _vnwd     .,			///
	label("Group variable") option(group)

  // CNREG
  TEXT     tx_cens   holdx     holdy     _iwd      .,			///
	label("Variable that identifies censored observations (required):")
  VARNAME  vn_cens   @         _ss       _vnwd     .,			///
	label("Variable that identifies censored observations:")	///
	option(censored)

  // NBREG
  GROUPBOX gb_disper holdx     holdy     _iwd      _ht2,		///
		label("Parameterization of dispersion")
  RADIO    rb_mean   _ilft     _ss       _cwd2     ., first		///
		label("A function of the expected mean")		///
		option("dispersion(mean)")
  RADIO    rb_cons   _lft2     @         @         ., last		///
		label("A constant")					///
		option("dispersion(constant)")

  // QREG
  SPINNER  sp_quantile holdx   holdy     _spwd     .,			///
		label("Quantile to estimate")				///
		min(1)							///
		max(100)						///
		default(50)						///
		option("quantile")
  TEXT     tx_quantile    _spsep    @         _spr      .,		///
		label("Quantile to estimate")

  // STREG
  GROUPBOX gb_model  holdx     holdy     _iwd      _ht6,		///
	label("Survival distribution")
  RADIO    rb_exp    _ilft     _ss       _cwd2     .,			///
	label("Exponential")						///
	first								///
	option(dist(exponential))
  RADIO    rb_weib   _lft2     @         @         .,			///
	label("Weibull")						///
	option(dist(weibull))
  RADIO    rb_gomp   _ilft     _ss       @         .,			///
	label("Gompertz")						///
	option(dist(gompertz))
  RADIO    rb_logn   _lft2     @         @         .,			///
	label("Log normal")						///
	option(dist(lognormal))
  RADIO    rb_logl   _ilft     _ss       @         .,			///
	label("Log logistic")						///
	option(dist(loglogistic))
  RADIO    rb_gamma  _lft2     @         @         .,			///
	label("Generalized gamma")					///
	last								///
	option(dist(gamma))

  // TOBIT
  GROUPBOX gb_censor holdx     holdy     _iwd      _ht8h,		///
		label("Specify at least one censoring limit")
  RADIO    rb_noll   _indent   _ss       _cwd2     ., first		///
	  	label("No left-censoring limit")			///
		onclickon("gaction model2.en_ll.disable")
  DEFINE y @y
  RADIO    rb_ll     @         _ss       @         .,			///
		label("Left-censoring at minimum")			///
		clickon("gaction model2.en_ll.disable")			///
		option("ll")	default(1)
  RADIO    rb_llarg  @         _ss       @         ., last		///
		label("Specified left-censoring limit:")		///
		clickon("gaction model2.en_ll.enable")
  EDIT     en_ll     _indent2  _ss       _en14wd   .,			///
		label("Left-censoring limit")				///
		numonly							///
		option("ll")
  RADIO    rb_noul   _lft2     y         _cwd2     ., first		///
		onclickon("gaction model2.en_ul.disable")		///
		label("No right-censoring limit")
  RADIO    rb_ul     @         _ss       @         .,			///
		label("Right-censoring at maximum")			///
		clickon("gaction model2.en_ul.disable")			///
		option("ul")
  RADIO    rb_ularg  @         _ss       @         ., last		///
		label("Specified right-censoring limit:")		///
		clickon("gaction model2.en_ul.enable")
  EDIT     en_ul     _indent2  _ss       _en14wd   .,			///
		label("Right-censoring limit")				///
		numonly option("ul")

  // This goes at the bottom of this tab.
  TEXT     tx_regopt _lft      _ht22     _iwd      .,			///
	label("Other options accepted by chosen regression command:")

  EDIT     ed_regopt @         _ss       @         .,			///
	label("Other options accepted by chosen regression command")

END

SCRIPT model2_lr_on
BEGIN
	model2.gb_selstat.show
	model2.rb_wald.show
	model2.rb_lr.show
END

SCRIPT model2_lr_off
BEGIN
	model2.gb_selstat.hide
	model2.rb_wald.hide
	model2.rb_lr.hide
END

SCRIPT model2_dist_on
BEGIN
	model2.gb_model.show
	model2.rb_exp.show
	model2.rb_weib.show
	model2.rb_gomp.show
	model2.rb_logn.show
	model2.rb_logl.show
	model2.rb_gamma.show
END

SCRIPT model2_dist_off
BEGIN
	model2.gb_model.hide
	model2.rb_exp.hide
	model2.rb_weib.hide
	model2.rb_gomp.hide
	model2.rb_logn.hide
	model2.rb_logl.hide
	model2.rb_gamma.hide
END

SCRIPT model2_group_on
BEGIN
	model2.tx_group.show
	model2.vn_group.show
END

SCRIPT model2_group_off
BEGIN
	model2.tx_group.hide
	model2.vn_group.hide
END

SCRIPT model2_cens_on
BEGIN
	model2.tx_cens.show
	model2.vn_cens.show
END

SCRIPT model2_cens_off
BEGIN
	model2.tx_cens.hide
	model2.vn_cens.hide
END

SCRIPT model2_disp_on
BEGIN
	model2.gb_disper.show
	model2.rb_mean.show
	model2.rb_cons.show
END

SCRIPT model2_disp_off
BEGIN
	model2.gb_disper.hide
	model2.rb_mean.hide
	model2.rb_cons.hide
END

SCRIPT model2_quant_on
BEGIN
	model2.sp_quantile.show
	model2.tx_quantile.show
END

SCRIPT model2_quant_off
BEGIN
	model2.sp_quantile.hide
	model2.tx_quantile.hide
END

SCRIPT model2_llul_on
BEGIN
	model2.gb_censor.show
	model2.rb_noll.show
	model2.rb_ll.show
	model2.rb_llarg.show
	model2.en_ll.show
	model2.rb_noul.show
	model2.rb_ul.show
	model2.rb_ularg.show
	model2.en_ul.show
END

SCRIPT model2_llul_off
BEGIN
	model2.gb_censor.hide
	model2.rb_noll.hide
	model2.rb_ll.hide
	model2.rb_llarg.hide
	model2.en_ll.hide
	model2.rb_noul.hide
	model2.rb_ul.hide
	model2.rb_ularg.hide
	model2.en_ul.hide
END

INCLUDE byifin
INCLUDE weights_fpai

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

  RADIO    rb_coef     _lft        _ls       _iwd        ., first	///
		label("Report coefficients (default)")			///
		option(NONE)
  RADIO    rb_nohr     @           _ss       @           .,		///
		label("Report coefficients instead of hazard ratios")	///
		option(nohr)
  RADIO    rb_irr      @           @         @           .,		///
		label("Report incidence-rate ratios")			///
		option(irr)
  RADIO    rb_or       @           @         @           .,		///
		label("Report odds ratios")				///
		option(or)
  RADIO    rb_rrr      @           @         @           .,		///
		label("Report reliative-risk ratios")			///
		option(rrr)
  RADIO    rb_eform    @           @         @           ., last	///
		label("Report exponentiated coefficients")		///
		option(eform)
END

SCRIPT rpt_eform_off
BEGIN
	rpt.rb_coef.hide
	rpt.rb_nohr.hide
	rpt.rb_irr.hide
	rpt.rb_or.hide
	rpt.rb_rrr.hide
	rpt.rb_eform.hide
END

SCRIPT rpt_nohr_on
BEGIN
	rpt.rb_coef.setlabel "Report hazard ratios (default)"
	rpt.rb_coef.show
	rpt.rb_nohr.show
	rpt.rb_irr.hide
	rpt.rb_or.hide
	rpt.rb_rrr.hide
	rpt.rb_eform.hide
END

SCRIPT rpt_irr_on
BEGIN
	rpt.rb_coef.setlabel "Report coefficients (default)"
	rpt.rb_coef.show
	rpt.rb_nohr.hide
	rpt.rb_irr.show
	rpt.rb_or.hide
	rpt.rb_rrr.hide
	rpt.rb_eform.hide
END

SCRIPT rpt_or_on
BEGIN
	rpt.rb_coef.setlabel "Report coefficients (default)"
	rpt.rb_coef.show
	rpt.rb_nohr.hide
	rpt.rb_irr.hide
	rpt.rb_or.show
	rpt.rb_rrr.hide
	rpt.rb_eform.hide
END

SCRIPT rpt_rrr_on
BEGIN
	rpt.rb_coef.setlabel "Report coefficients (default)"
	rpt.rb_coef.show
	rpt.rb_nohr.hide
	rpt.rb_irr.hide
	rpt.rb_or.show
	rpt.rb_rrr.hide
	rpt.rb_eform.hide
END

SCRIPT rpt_eform_on
BEGIN
	rpt.rb_coef.setlabel "Report coefficients (default)"
	rpt.rb_coef.show
	rpt.rb_nohr.hide
	rpt.rb_irr.hide
	rpt.rb_or.hide
	rpt.rb_rrr.hide
	rpt.rb_eform.show
END

PROGRAM stepwise_command
BEGIN
	allowxi
	INCLUDE _by_pr
	put "stepwise "
	beginoptions
		if ! (main.ck_pr | main.ck_pe) {
			stopbox stop ///
			`"On the "Model" tab,"' ///
			`"At least one of the "Significance level""' ///
			`"options must be specified"'
		}
		if main.ck_pr {
			require main.en_pr
			optionarg main.en_pr
		}
		if main.ck_pe {
			require main.en_pe
			optionarg main.en_pe
		}
		option model2.ck_forward
		option model2.ck_hier
		option model2.ck_lock1
		option model2.rb_lr
	endoptions
END

PROGRAM command_command
BEGIN
	put main.cb_cmd
	if !H(main.vn_dv1) {
		require main.vn_dv1
	}
	put " " main.vn_dv1
	if !H(main.vn_dv2) {
		require main.vn_dv2
		put " " main.vn_dv2
	}
	require main.vn_term1
	put " "
	put "("
	put /hidden main.vn_term1
	put ")"
	if main.vn_term2 {
		put " "
		put /hidden "(" main.vn_term2 ") "
	}
	if main.vn_term3 {
		put " "
		put /hidden "(" main.vn_term3 ") "
	}
	if main.vn_term4 {
		put " "
		put /hidden "(" main.vn_term4 ") "
	}
	if main.vn_term5 {
		put " "
		put /hidden "(" main.vn_term5 ") "
	}
	if main.vn_term6 {
		put " "
		put /hidden "(" main.vn_term6 ") "
	}
	if main.vn_term7 {
		put " "
		put /hidden "(" main.vn_term7 ") "
	}
	if main.vn_term8 {
		put " "
		put /hidden "(" main.vn_term8 ") "
	}
	if main.vn_term9 {
		put " "
		put /hidden "(" main.vn_term9 ") "
	}
	if main.vn_term10 {
		put " "
		put /hidden "(" main.vn_term10 ") "
	}
	INCLUDE _ifin_pr
	INCLUDE _weights_pr
	beginoptions
		// CLOGIT
		if !H(model2.vn_group) {
			require model2.vn_group
			optionarg model2.vn_group
		}
		// CNREG
		if !H(model2.vn_cens) {
			require model2.vn_cens
			optionarg model2.vn_cens
		}
		// NBREG
		option model2.rb_cons
		// QREG
		optionarg model2.sp_quantile
		// STREG
		option model2.rb_exp
		option model2.rb_weib
		option model2.rb_gomp
		option model2.rb_logn
		option model2.rb_logl
		option model2.rb_gamma
		// TOBIT
		if model2.rb_noll & model2.rb_noul {
			stopbox stop				///
			`"On the "Model 2" tab,"'		///
			`"at least one censoring limit must be specified"'
		}
		if model2.rb_llarg {
			require model2.en_ll
			optionarg model2.en_ll
		}
		if model2.rb_ularg {
			require model2.en_ul
			optionarg model2.en_ul
		}
		option model2.rb_ll
		option model2.rb_ul

		put " " model2.ed_regopt
		optionarg /hidedefault rpt.sp_level
		option rpt.rb_coef
		option rpt.rb_nohr
		option rpt.rb_irr
		option rpt.rb_or
		option rpt.rb_rrr
		option rpt.rb_eform
	endoptions
END

PROGRAM command
BEGIN
	put /program stepwise_command
	put " " ":" " " /program command_command
END

⌨️ 快捷键说明

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