. set trace on . runmlwin normexam cons standlrt, level2(school: cons) level1(student: cons) nopause ------------------------------------------------------------------------------------- begin runmlwin --- - if c(stata_version) >= 15 local user user - if _caller() >= 12 version 12.0, `user' = if _caller() >= 12 version 12.0, - if _caller() <= 9 version 9.0, `user' = if _caller() <= 9 version 9.0, - display " " - if replay() { if ("`e(cmd)'" ~= "runmlwin") error 301 syntax [, Level(cilevel) noHEADer noGRoup noCONTrast noFETable noRETable SD CORrelations OR IRr RRr MO > de MEdian Zratio *] runmlwin_display, level(`level') `header' `group' `contrast' `fetable' `retable' `sd' `correlations' ` > or' `irr' `rrr' `mode' `median' `zratio' makecns, displaycns } - else { - syntax anything [if] [in], [Level(cilevel) noHEADer noGRoup noCONTrast noFETable noRETable SD CORrelat > ions OR IRr RRr MOde MEdian Zratio *] - timer clear 99 - timer on 99 - Estimates `0' = Estimates normexam cons standlrt, level2(school: cons) level1(student: cons) nopause ------------------------------------------------------------------------- begin runmlwin.Estimates --- - if _caller() >= 12 version 12.0 - if _caller() <= 9 version 9.0 - local runmlwin_cmdline `0' = local runmlwin_cmdline normexam cons standlrt, level2(school: cons) level1(student: cons) nopause - local maxlevels 1 - gettoken comma tmpstr : 0, parse(",") bind - while strpos("`tmpstr'", "level") != 0 { = while strpos(", level2(school: cons) level1(student: cons) nopause", "level") != 0 { - local tmpstr = substr("`tmpstr'", strpos("`tmpstr'", "level") + 5, .) = local tmpstr = substr(", level2(school: cons) level1(student: cons) nopause", strpos(", level2(schoo > l: cons) level1(student: cons) nopause", "level") + 5, .) - local lev = substr("`tmpstr'", 1, strpos("`tmpstr'", "(") - 1) = local lev = substr("2(school: cons) level1(student: cons) nopause", 1, strpos("2(school: cons) level > 1(student: cons) nopause", "(") - 1) - if `=real("`lev'")' != . { = if 2 != . { - if `lev' > `maxlevels' { = if 2 > 1 { - local maxlevels `lev' = local maxlevels 2 - } - } - } - while strpos("`tmpstr'", "level") != 0 { = while strpos("2(school: cons) level1(student: cons) nopause", "level") != 0 { - local tmpstr = substr("`tmpstr'", strpos("`tmpstr'", "level") + 5, .) = local tmpstr = substr("2(school: cons) level1(student: cons) nopause", strpos("2(school: cons) level > 1(student: cons) nopause", "level") + 5, .) - local lev = substr("`tmpstr'", 1, strpos("`tmpstr'", "(") - 1) = local lev = substr("1(student: cons) nopause", 1, strpos("1(student: cons) nopause", "(") - 1) - if `=real("`lev'")' != . { = if 1 != . { - if `lev' > `maxlevels' { = if 1 > 2 { local maxlevels `lev' } - } - } - while strpos("`tmpstr'", "level") != 0 { = while strpos("1(student: cons) nopause", "level") != 0 { local tmpstr = substr("`tmpstr'", strpos("`tmpstr'", "level") + 5, .) local lev = substr("`tmpstr'", 1, strpos("`tmpstr'", "(") - 1) if `=real("`lev'")' != . { if `lev' > `maxlevels' { local maxlevels `lev' } } } - if ("`verbose'"~="") display as text "Highest level: `maxlevels'" = if (""~="") display as text "Highest level: 2" - local levargs - forvalues l = 2/`maxlevels' { = forvalues l = 2/2 { - local levargs LEVEL`l'(string) `levargs' = local levargs LEVEL2(string) - } - syntax anything(name=eqlist id="equations" equalok) [if] [in], [ `levargs' ] LEVEL1(string) [ Weight > s(string) Constraints(numlist >0 integer) IGLS RIGLS TOLerance(numlist >0 integer min=1 max=1) MAXIter > ations(numlist >0 integer min=1 max=1) FPSandwich RPSandwich INITSPrevious INITSB(namelist min=1 max=1 > ) INITSV(namelist min=1 max=1) INITSModel(namelist min=1 max=1) DISCRETE(string) MCMC(string) SEED(num > list integer min=1 max=1) SIMulate(namelist min=1 max=1) MLWINPATH(string) MLWINSCRIPTPATH(string) VIE > WMacro SAVEMacro(string) SAVEWorksheet(string) SAVEStata(string) USEWorksheet(string) Level(cilevel) O > R IRr RRr SD CORrelations MOde MEdian Zratio noHEADer noGRoup noCONTrast noFETable noRETable noDrop FO > RCESort FORCERecast noMLWIN noPause BATCh noSORT PLUGIN Verbose VIEWFULLMacro SAVEFULLMacro(string) SA > VEEQuation(string) MLWINSETTINGS(string) ] = syntax anything(name=eqlist id="equations" equalok) [if] [in], [ LEVEL2(string) ] LEVEL1(string) [ W > eights(string) Constraints(numlist >0 integer) IGLS RIGLS TOLerance(numlist >0 integer min=1 max=1) MA > XIterations(numlist >0 integer min=1 max=1) FPSandwich RPSandwich INITSPrevious INITSB(namelist min=1 > max=1) INITSV(namelist min=1 max=1) INITSModel(namelist min=1 max=1) DISCRETE(string) MCMC(string) SEE > D(numlist integer min=1 max=1) SIMulate(namelist min=1 max=1) MLWINPATH(string) MLWINSCRIPTPATH(string > ) VIEWMacro SAVEMacro(string) SAVEWorksheet(string) SAVEStata(string) USEWorksheet(string) Level(cilev > el) OR IRr RRr SD CORrelations MOde MEdian Zratio noHEADer noGRoup noCONTrast noFETable noRETable noDr > op FORCESort FORCERecast noMLWIN noPause BATCh noSORT PLUGIN Verbose VIEWFULLMacro SAVEFULLMacro(strin > g) SAVEEQuation(string) MLWINSETTINGS(string) ] - if c(mode) == "batch" local batch = c(mode) - if "`mlwinpath'" == "" & "`mlwinscriptpath'" ~= "" & "`batch'" ~= "" local mlwinpath `mlwinscriptpat > h' = if "" == "" & "" ~= "" & "" ~= "" local mlwinpath - if "`mlwinpath'" == "" & "$MLwiNScript_path" ~= "" & "`batch'" ~= "" local mlwinpath $MLwiNScript_pa > th = if "" == "" & "" ~= "" & "" ~= "" local mlwinpath - if "`mlwinpath'" == "" & "$MLwiN_path" ~= "" local mlwinpath $MLwiN_path = if "" == "" & "" ~= "" local mlwinpath - if "`mlwin'"~="nomlwin" & "`mlwinpath'" ~= "" { = if ""~="nomlwin" & "" ~= "" { capture confirm file "`mlwinpath'" if _rc == 601 { display as error "`mlwinpath' does not exist." _n exit 198 } local versionok = 1 local versionold = 0 quietly capture runmlwin_verinfo `mlwinpath' if _rc == 198 { display as error "`mlwinpath' is not a valid version of MLwiN" exit 198 } if (`r(ver1)' < 2) | (`r(ver1)' == 2 & `r(ver2)' < 25) local versionok = 0 if (`r(ver1)' < 2) | (`r(ver1)' == 2 & `r(ver2)' < 28) local versionold = 1 if `versionok' == 0 { display as error "runmlwin requires MLwiN version 2.25 or higher. You can download the latest versio > n of MLwiN at: http://www.bristol.ac.uk/cmm/software/mlwin/download/upgrades.html" exit 198 } if `versionold' == 1 display as error "WARNING: Your version of MLwiN is out of date. You can downlo > ad the latest version of MLwiN at: http://www.bristol.ac.uk/cmm/software/mlwin/download/upgrades.html" local mlwinversion `r(ver1)'.`r(ver2)' } - marksample touse, novarlist - if ("`discrete'"~="") { = if (""~="") { local 0 , `discrete' syntax , Distribution(string) [Link(namelist min=1 max=1) DEnominator(varlist numeric) Extra Offset( > varname numeric) Proportion(varname) Basecategory(numlist integer min=1 max=1) MQL1 MQL2 PQL1 PQL2] local validdistributions normal binomial poisson nbinomial multinomial local checkdistribution :list distribution & validdistributions if "`checkdistribution'"=="" { display as error "Invalid distribution(). Valid distributions are: normal, binomial, poisson, nbinom > ial, multinomial" exit 198 } if ("`mql2'"=="" & "`pql1'"=="" & "`pql2'"=="") local linearization MQL1 if ("`mql2'"~="") local linearization MQL2 if ("`pql1'"~="") local linearization PQL1 if ("`pql2'"~="") local linearization PQL2 if "`link'"=="" { if ("`distribution'"=="binomial") { di as error "You must specify the link() function. Valid link functions for the binomial distributio > n are: logit, probit and cloglog." exit 198 } if ("`distribution'"=="multinomial") { di as error "You must specify the link() function. Valid link functions for the multinomial distribu > tion are: mlogit, ologit, oprobit, ocloglog." exit 198 } if ("`distribution'"=="poisson" | "`distribution'"=="nbinomial") local link log } if "`link'" ~= "" { local 0 , `link' syntax , [Identity Logit Probit Cloglog Mlogit OLogit OProbit OCloglog LOG] if ("`distribution'"=="binomial") { if ~inlist("`link'","logit","probit","cloglog") { display as error "Invalid link() function. Valid link functions for the binomial distribution are: l > ogit, probit and cloglog." _n exit 198 } } if ("`distribution'"=="multinomial") { if ~inlist("`link'","mlogit","ologit","oprobit","ocloglog") { display as error "Invalid link() function. Valid link functions for the multinomial distribution are > : mlogit, ologit, oprobit, ocloglog." _n exit 198 } } if ("`distribution'"=="poisson") { if ~inlist("`link'","log") { display as error "Invalid link() function. Valid link functions for the poisson distribution are: lo > g." _n exit 198 } } if "`identity'" ~= "" local link identity if "`logit'" ~= "" local link logit if "`probit'" ~= "" local link probit if "`cloglog'" ~= "" local link cloglog if "`mlogit'" ~= "" local link mlogit if "`ologit'" ~= "" local link ologit if "`oprobit'" ~= "" local link oprobit if "`ocloglog'" ~= "" local link ocloglog if "`log'" ~= "" local link log } } - else { - local link identity - } - tempname o - .`o' = ._eqlist.new, eqopts(NOConstant) eqargopts(EQ) numdepvars(1) noneedvarlist = .__000002 = ._eqlist.new, eqopts(NOConstant) eqargopts(EQ) numdepvars(1) noneedvarlist -class { -instance: - array n_depvars - string needequal - string noneedvarlist - string wtypes - string collinear - string nocons - string nocons_ignore - double n_eq - string gl_if - string gl_in - string gl_wgt - string gl_options - _optlist eq_opts_allowed -class { -instance: - array options = {} - array names = {} -} - array eq_list - _optlist mark_opts - array mark_list - array mark_name - _optlist rmcoll_opts - array rmcoll_list - array rmcoll_name - _optlist rmdcoll_opts - array rmdcoll_list - array rmdcoll_name -} ------------------------------------------------------------------------------ begin _eqlist.new --- - version 9.2 - ._init -------------------------------------------------------------------------- begin _eqlist._init --- - version 9.2 - .n_eq = 0 - .gl_if = "" - .gl_in = "" - .gl_wgt = "" - .gl_options = "" - .eq_list = {} ---------------------------------------------------------------------------- end _eqlist._init --- - ._setup `0' = ._setup , eqopts(NOConstant) eqargopts(EQ) numdepvars(1) noneedvarlist ------------------------------------------------------------------------- begin _eqlist._setup --- - version 9.2 - .mark_list = {} - .mark_name = {} - .mark_opts.reset ----------------------------------------------------------------------- begin _optlist.reset --- - version 9 - .options = {} - .names = {} ------------------------------------------------------------------------- end _optlist.reset --- - .rmcoll_list = {} - .rmcoll_name = {} - .rmcoll_opts.reset ----------------------------------------------------------------------- begin _optlist.reset --- - version 9 - .options = {} - .names = {} ------------------------------------------------------------------------- end _optlist.reset --- - .rmdcoll_list = {} - .rmdcoll_name = {} - .rmdcoll_opts.reset ----------------------------------------------------------------------- begin _optlist.reset --- - version 9 - .options = {} - .names = {} ------------------------------------------------------------------------- end _optlist.reset --- - syntax [, EQopts(namelist) EQARGopts(namelist) noNEEDVARLIST COMMONopts(string asis) MARKopts(na > melist) RMCOLLopts(namelist) RMDCOLLopts(namelist) NUMDEPvars(numlist integer >=0) NEEDEQUAL WTYPES(st > ring) IGNORENOCONS ] - .eq_opts_allowed.reset ----------------------------------------------------------------------- begin _optlist.reset --- - version 9 - .options = {} - .names = {} ------------------------------------------------------------------------- end _optlist.reset --- - foreach opt of local eqopts { - .eq_opts_allowed.addopt `opt' = .eq_opts_allowed.addopt NOConstant ---------------------------------------------------------------------- begin _optlist.addopt --- - version 9 - syntax name(name=optspec) [, PASSthru] - local mname = lower("`optspec'") = local mname = lower("NOConstant") - if "`passthru'" != "" { = if "" != "" { local optspec `optspec'(passthru) } - .options.Arrpush "`optspec'" = .options.Arrpush "NOConstant" - .names.Arrpush "`mname'" = .names.Arrpush "noconstant" ------------------------------------------------------------------------ end _optlist.addopt --- - } - foreach opt of local eqargopts { - .eq_opts_allowed.addopt `opt', passthru = .eq_opts_allowed.addopt EQ, passthru ---------------------------------------------------------------------- begin _optlist.addopt --- - version 9 - syntax name(name=optspec) [, PASSthru] - local mname = lower("`optspec'") = local mname = lower("EQ") - if "`passthru'" != "" { = if "passthru" != "" { - local optspec `optspec'(passthru) = local optspec EQ(passthru) - } - .options.Arrpush "`optspec'" = .options.Arrpush "EQ(passthru)" - .names.Arrpush "`mname'" = .names.Arrpush "eq" ------------------------------------------------------------------------ end _optlist.addopt --- - } - local i 0 - foreach opt of local markopts { .mark_opts.addopt `opt', passthru } - local i 0 - foreach opt of local rmcollopts { .rmcoll_opts.addopt `opt', passthru } - local i 0 - foreach opt of local rmdcollopts { .rmdcoll_opts.addopt `opt', passthru } - .n_depvars.Arrdropall - if "`numdepvars'" != "" { = if "1" != "" { - foreach ndep of local numdepvars { - .n_depvars.Arrpush `ndep' = .n_depvars.Arrpush 1 - } - } - else .n_depvars.Arrpush 1 - .needequal = "`needequal'" = .needequal = "" - .wtypes = "`wtypes'" = .wtypes = "" - .noneedvarlist = "`needvarlist'" = .noneedvarlist = "noneedvarlist" - .nocons_ignore = "`ignorenocons'" = .nocons_ignore = "" --------------------------------------------------------------------------- end _eqlist._setup --- -------------------------------------------------------------------------------- end _eqlist.new --- - .`o'.parse `eqlist' = .__000002.parse normexam cons standlrt ---------------------------------------------------------------------------- begin _eqlist.parse --- - version 9.2 - ._init -------------------------------------------------------------------------- begin _eqlist._init --- - version 9.2 - .n_eq = 0 - .gl_if = "" - .gl_in = "" - .gl_wgt = "" - .gl_options = "" - .eq_list = {} ---------------------------------------------------------------------------- end _eqlist._init --- - local MARKOPTLIST `"`.mark_opts.dumpoptions'"' ------------------------------------------------------------------- begin _optlist.dumpoptions --- - version 9 - forval i = 1/`.options.arrnels' { = forval i = 1/0 { local optlist `optlist' `.options[`i']' } - local optlist : list uniq optlist - sreturn local optlist `"`optlist'"' = sreturn local optlist `""' - class exit `"`optlist'"' = class exit `""' --------------------------------------------------------------------- end _optlist.dumpoptions --- = local MARKOPTLIST `""' - local RMCOLLOPTLIST `"`.rmcoll_opts.dumpoptions'"' ------------------------------------------------------------------- begin _optlist.dumpoptions --- - version 9 - forval i = 1/`.options.arrnels' { = forval i = 1/0 { local optlist `optlist' `.options[`i']' } - local optlist : list uniq optlist - sreturn local optlist `"`optlist'"' = sreturn local optlist `""' - class exit `"`optlist'"' = class exit `""' --------------------------------------------------------------------- end _optlist.dumpoptions --- = local RMCOLLOPTLIST `""' - local RMDCOLLOPTLIST `"`.rmdcoll_opts.dumpoptions'"' ------------------------------------------------------------------- begin _optlist.dumpoptions --- - version 9 - forval i = 1/`.options.arrnels' { = forval i = 1/0 { local optlist `optlist' `.options[`i']' } - local optlist : list uniq optlist - sreturn local optlist `"`optlist'"' = sreturn local optlist `""' - class exit `"`optlist'"' = class exit `""' --------------------------------------------------------------------- end _optlist.dumpoptions --- = local RMDCOLLOPTLIST `""' - _parse expand EQ GL : 0, gweight common( `commonopts' `MARKOPTLIST' `RMCOLLOPTLIST' `RMDCOLLOPTLIS > T' COLlinear ) = _parse expand EQ GL : 0, gweight common( COLlinear ) - if `EQ_n' == 0 & "`.noneedvarlist'" == "" { = if 1 == 0 & "noneedvarlist" == "" { syntax varlist } - local rebind = `EQ_n' == 1 = local rebind = 1 == 1 - if `rebind' { = if 1 { - tokenize `"`0'"', parse(",()[]") = tokenize `"normexam cons standlrt"', parse(",()[]") - local rebind = `"`1'"' != "(" & `"`2'"' == "(" = local rebind = `"normexam cons standlrt"' != "(" & `""' == "(" - } - if `rebind' { = if 0 { while `:length local 0' { gettoken tok 0 : 0, parse(" ,") bind match(par) if "`par'" == "(" { local ZERO `"(`ZERO') (`tok') `0'"' local 0 } else if inlist("`tok'", "if", "in", ",") { local ZERO `"(`ZERO') `tok' `0'"' local 0 } else { local ZERO `"`ZERO' `tok'"' } } _parse expand EQ GL : ZERO, gweight common( `MARKOPTLIST' `RMCOLLOPTLIST' `RMDCOLLOPTLIST' COLline > ar ) } - forval i = 1/`EQ_n' { = forval i = 1/1 { - if `i' <= `.n_depvars.arrnels' { = if 1 <= 1 { - local ndep = `.n_depvars[`i']' = local ndep = 1 - } - .eq_list[`i'] = ._eqspec.new, numdepvars(`ndep') `.needequal' `.noneedvarlist' wtypes(`.wtypes') ` > .nocons_ignore' = .eq_list[1] = ._eqspec.new, numdepvars(1) noneedvarlist wtypes() -class { -instance: - double n_depvars - double needequal - double needvarlist - string wtypes - string name - string depvars - double hasequal - string indepvars - string other_markvars - double nocons - double nocons_ignore - string offset - double exposure - string if - string in - string wgt - string options -} ---------------------------------------------------------------------------- begin _eqspec.new --- - version 9.2 - syntax [, NUMDEPvars(numlist integer >=0 max=1) NEEDEQUAL noNEEDVARLIST WTYPES(string) IGNORENOC > ONS ] - .n_depvars = 1 - if `:list sizeof numdepvars' { = if 1 { - .n_depvars = `numdepvars' = .n_depvars = 1 - } - .needequal = ("`needequal'" != "") = .needequal = ("" != "") - .needvarlist = ("`needvarlist'" == "") = .needvarlist = ("noneedvarlist" == "") - .nocons_ignore = ("`ignorenocons'" != "") = .nocons_ignore = ("" != "") - .wtypes = "`wtypes'" = .wtypes = "" ------------------------------------------------------------------------------ end _eqspec.new --- - .eq_list[`i'].parse `.eq_opts_allowed.objkey':`EQ_`i'' = .eq_list[1].parse __key(c840e58):normexam cons standlrt -------------------------------------------------------------------------- begin _eqspec.parse --- - version 9.2 - _on_colon_parse `0' = _on_colon_parse __key(c840e58):normexam cons standlrt ---------------------------------------------------------------------- begin _on_colon_parse --- - version 8.2 - sreturn local before "" - sreturn local after "" - gettoken before after : 0, parse(":") bind match(par) quotes - if "`par'" != "" { = if "" != "" { local before `"(`before')"' } - if `"`before'"' == ":" { = if `"__key(c840e58)"' == ":" { sreturn local after `"`after'"' exit } - while `"`COLON'"' != ":" & `"`after'"' != "" { = while `""' != ":" & `":normexam cons standlrt"' != "" { - gettoken COLON after : after, parse(":") bind match(par) quotes - if "`par'" != "" { = if "" != "" { local before `before' (`COLON') local COLON } - else if `"`COLON'"' != ":" { = else if `":"' != ":" { local before `"`before' `COLON'"' local COLON } - } - while `"`COLON'"' != ":" & `"`after'"' != "" { = while `":"' != ":" & `"normexam cons standlrt"' != "" { gettoken COLON after : after, parse(":") bind match(par) quotes if "`par'" != "" { local before `before' (`COLON') local COLON } else if `"`COLON'"' != ":" { local before `"`before' `COLON'"' local COLON } } - if `"`COLON'"' != ":" { = if `":"' != ":" { di as err "'' found where ':' expected" exit 198 } - sreturn local before `"`before'"' = sreturn local before `"__key(c840e58)"' - sreturn local after `"`after'"' = sreturn local after `"normexam cons standlrt"' ------------------------------------------------------------------------ end _on_colon_parse --- - local ol `s(before)' = local ol __key(c840e58) - if `:list sizeof ol' { = if 1 { - local OPTLIST `"`.`ol'.dumpoptions'"' ----------------------------------------------------------------- begin _optlist.dumpoptions --- - version 9 - forval i = 1/`.options.arrnels' { = forval i = 1/2 { - local optlist `optlist' `.options[`i']' = local optlist NOConstant - } - local optlist `optlist' `.options[`i']' = local optlist NOConstant EQ(passthru) - } - local optlist : list uniq optlist - sreturn local optlist `"`optlist'"' = sreturn local optlist `"NOConstant EQ(passthru)"' - class exit `"`optlist'"' = class exit `"NOConstant EQ(passthru)"' ------------------------------------------------------------------- end _optlist.dumpoptions --- = local OPTLIST `"NOConstant EQ(passthru)"' - local OPTNAMES `"`.`ol'.dumpnames'"' ------------------------------------------------------------------- begin _optlist.dumpnames --- - version 9 - forval i = 1/`.names.arrnels' { = forval i = 1/2 { - local namelist `namelist' `.names[`i']' = local namelist noconstant - } - local namelist `namelist' `.names[`i']' = local namelist noconstant eq - } - local namelist : list uniq namelist - sreturn local namelist `"`namelist'"' = sreturn local namelist `"noconstant eq"' - class exit `"`namelist'"' = class exit `"noconstant eq"' --------------------------------------------------------------------- end _optlist.dumpnames --- = local OPTNAMES `"noconstant eq"' - local NOCONS constant noconstant - if `"`:list NOCONS & OPTNAMES'"' == "" { = if `"noconstant"' == "" { local NOCONS noCONStant } - else local NOCONS - } - local 0 `"`s(after)'"' = local 0 `"normexam cons standlrt"' - if `"`.wtypes'"' != "" { = if `""' != "" { local wgt "[`.wtypes']" } - syntax [anything(equalok)] [if] [in] `wgt' [, `OPTLIST' `NOCONS' *] = syntax [anything(equalok)] [if] [in] [, NOConstant EQ(passthru) *] - local HOLDIF `"`if'"' = local HOLDIF `""' - local HOLDIN `"`in'"' = local HOLDIN `""' - if "`wgt'" != "" & "`weight'" != "" { = if "" != "" & "" != "" { local HOLDWGT `"[`weight'`exp']"' } - gettoken NAME REST : anything, parse(":") - if trim("`NAME'") == ":" { = if trim("normexam cons standlrt") == ":" { di as err "nothing found where equation name expected" exit 198 } - if `:list sizeof REST' { = if 0 { ._confirm_eqname `NAME' local NAME : list retok NAME gettoken COLON anything : REST, parse(":") } - else { - local NAME - } - gettoken DEPVARS REST : anything, parse("=") bind - if "`DEPVARS'" == "=" { = if "normexam cons standlrt" == "=" { local REST : copy local anything local DEPVARS } - if (`:length local DEPVARS' == 0 & `.n_depvars') { = if (22 == 0 & 1) { di as err "nothing found where depvar expected" exit 198 } - if `"`REST'"' == "" { = if `""' == "" { - if 0`.needequal' { = if 00 { if `.needvarlist' | (`:length local DEPVARS' != 0 & `.n_depvars') { di as err "equal sign required to separate depvars from indepvars" exit 198 } } - local DEPVARS - local n_deps : list sizeof anything - if `n_deps' != 0 | `.needvarlist' { = if 3 != 0 | 0 { - if `n_deps' < `.n_depvars' { = if 3 < 1 { error 102 } - forval j = 1/`.n_depvars' { = forval j = 1/1 { - gettoken YY anything : anything - local DEPVARS `DEPVARS' `YY' = local DEPVARS normexam - } - local INDEPVARS : list retok anything - } - loca hasequal 0 - } - else { gettoken EQ INDEPVARS : REST, parse("=") bind local hasequal 1 } - if `:list sizeof DEPVARS' { = if 1 { - _fv_check_depvar `DEPVARS' = _fv_check_depvar normexam - tsunab DEPVARS : `DEPVARS' = tsunab DEPVARS : normexam ------------------------------------------------------------------------------- begin tsunab --- - version 6 - gettoken user 0: 0, parse(" :") - gettoken colon 0: 0, parse(" :") - if `"`colon'"' != ":" { error 198 } = if `":"' != ":" { error 198 } - syntax [varlist(ts default=empty)] [, MIN(integer 1) MAX(integer 32000) NAME(string)] - c_local `user' `varlist' = c_local DEPVARS normexam - local n : word count `varlist' = local n : word count normexam - if `n'>=`min' & `n'<=`max' { exit } = if 1>=1 & 1<=32000 { exit } --------------------------------------------------------------------------------- end tsunab --- - } - if `:list sizeof INDEPVARS' { = if 2 { - fvunab INDEPVARS : `INDEPVARS' = fvunab INDEPVARS : cons standlrt ------------------------------------------------------------------------------- begin fvunab --- - version 11 - _on_colon_parse `0' = _on_colon_parse INDEPVARS : cons standlrt -------------------------------------------------------------------- begin _on_colon_parse --- - version 8.2 - sreturn local before "" - sreturn local after "" - gettoken before after : 0, parse(":") bind match(par) quotes - if "`par'" != "" { = if "" != "" { local before `"(`before')"' } - if `"`before'"' == ":" { = if `"INDEPVARS "' == ":" { sreturn local after `"`after'"' exit } - while `"`COLON'"' != ":" & `"`after'"' != "" { = while `""' != ":" & `": cons standlrt"' != "" { - gettoken COLON after : after, parse(":") bind match(par) quotes - if "`par'" != "" { = if "" != "" { local before `before' (`COLON') local COLON } - else if `"`COLON'"' != ":" { = else if `":"' != ":" { local before `"`before' `COLON'"' local COLON } - } - while `"`COLON'"' != ":" & `"`after'"' != "" { = while `":"' != ":" & `" cons standlrt"' != "" { gettoken COLON after : after, parse(":") bind match(par) quotes if "`par'" != "" { local before `before' (`COLON') local COLON } else if `"`COLON'"' != ":" { local before `"`before' `COLON'"' local COLON } } - if `"`COLON'"' != ":" { = if `":"' != ":" { di as err "'' found where ':' expected" exit 198 } - sreturn local before `"`before'"' = sreturn local before `"INDEPVARS "' - sreturn local after `"`after'"' = sreturn local after `" cons standlrt"' ---------------------------------------------------------------------- end _on_colon_parse --- - local 0 `"`s(before)'"' = local 0 `"INDEPVARS "' - syntax name(id="macro name" name=user) - local 0 `"`s(after)'"' = local 0 `" cons standlrt"' - syntax [varlist(ts fv default=none)] [, MIN(integer 1) MAX(integer 32000) NAME(string) ] - c_local `user' `varlist' = c_local INDEPVARS cons standlrt - local n : list sizeof varlist - if (`min' <= `n' & `n' <= `max') exit = if (1 <= 2 & 2 <= 32000) exit --------------------------------------------------------------------------------- end fvunab --- - } - if inlist("noconstant", "`noconstant'", "`constant'") { = if inlist("noconstant", "", "") { if "`INDEPVARS'" == "" & ! `.nocons_ignore' { di as err "independent variables are required when option noconstant is specified" exit 102 } if "`NOCONS'" != "" { local options `options' noconstant } local NOCONS 1 } - else local NOCONS 0 - if `"`offset'`exposure'"' != "" { = if `""' != "" { ._check_offset, `offset' `exposure' local OFFSET "`s(offset)'" local EXPOSURE = ("`exposure'" != "") local OTHER `s(offset)' } - else local EXPOSURE 0 - local OPTIONS - local SPACE - foreach OPTNAME of local OPTNAMES { - if `"``OPTNAME''"' != "" { = if `""' != "" { local OPTIONS `"`OPTIONS'`SPACE'``OPTNAME''"' local SPACE " " } - } - if `"``OPTNAME''"' != "" { = if `""' != "" { local OPTIONS `"`OPTIONS'`SPACE'``OPTNAME''"' local SPACE " " } - } - if `"`options'"' != "" { = if `""' != "" { local OPTIONS `"`OPTIONS'`SPACE'`options'"' } - .name = `"`NAME'"' = .name = `""' - .depvars = `"`DEPVARS'"' = .depvars = `"normexam"' - .hasequal = `hasequal' = .hasequal = 0 - .indepvars = `"`:list retok INDEPVARS'"' = .indepvars = `"cons standlrt"' - .other_markvars = `"`:list retok OTHER'"' = .other_markvars = `""' - .nocons = `NOCONS' = .nocons = 0 - .if = `"`HOLDIF'"' = .if = `""' - .in = `"`HOLDIN'"' = .in = `""' - .wgt = `"`HOLDWGT'"' = .wgt = `""' - .offset = `"`OFFSET'"' = .offset = `""' - .exposure = `EXPOSURE' = .exposure = 0 - .options = `"`OPTIONS'"' = .options = `""' ---------------------------------------------------------------------------- end _eqspec.parse --- - } - local MARKOPTLIST `"`.mark_opts.dumpoptions'"' ------------------------------------------------------------------- begin _optlist.dumpoptions --- - version 9 - forval i = 1/`.options.arrnels' { = forval i = 1/0 { local optlist `optlist' `.options[`i']' } - local optlist : list uniq optlist - sreturn local optlist `"`optlist'"' = sreturn local optlist `""' - class exit `"`optlist'"' = class exit `""' --------------------------------------------------------------------- end _optlist.dumpoptions --- = local MARKOPTLIST `""' - local MARKOPTNAMES `"`.mark_opts.dumpnames'"' --------------------------------------------------------------------- begin _optlist.dumpnames --- - version 9 - forval i = 1/`.names.arrnels' { = forval i = 1/0 { local namelist `namelist' `.names[`i']' } - local namelist : list uniq namelist - sreturn local namelist `"`namelist'"' = sreturn local namelist `""' - class exit `"`namelist'"' = class exit `""' ----------------------------------------------------------------------- end _optlist.dumpnames --- = local MARKOPTNAMES `""' - local OPTLIST1 : subinstr local MARKOPTLIST "(passthru)" "(string asis)", all - local RMCOLLOPTLIST `"`.rmcoll_opts.dumpoptions'"' ------------------------------------------------------------------- begin _optlist.dumpoptions --- - version 9 - forval i = 1/`.options.arrnels' { = forval i = 1/0 { local optlist `optlist' `.options[`i']' } - local optlist : list uniq optlist - sreturn local optlist `"`optlist'"' = sreturn local optlist `""' - class exit `"`optlist'"' = class exit `""' --------------------------------------------------------------------- end _optlist.dumpoptions --- = local RMCOLLOPTLIST `""' - local RMCOLLOPTNAMES `"`.rmcoll_opts.dumpnames'"' --------------------------------------------------------------------- begin _optlist.dumpnames --- - version 9 - forval i = 1/`.names.arrnels' { = forval i = 1/0 { local namelist `namelist' `.names[`i']' } - local namelist : list uniq namelist - sreturn local namelist `"`namelist'"' = sreturn local namelist `""' - class exit `"`namelist'"' = class exit `""' ----------------------------------------------------------------------- end _optlist.dumpnames --- = local RMCOLLOPTNAMES `""' - local OPTLIST2 : subinstr local RMCOLLOPTLIST "(passthru)" "(string asis)", all - local RMDCOLLOPTLIST `"`.rmdcoll_opts.dumpoptions'"' ------------------------------------------------------------------- begin _optlist.dumpoptions --- - version 9 - forval i = 1/`.options.arrnels' { = forval i = 1/0 { local optlist `optlist' `.options[`i']' } - local optlist : list uniq optlist - sreturn local optlist `"`optlist'"' = sreturn local optlist `""' - class exit `"`optlist'"' = class exit `""' --------------------------------------------------------------------- end _optlist.dumpoptions --- = local RMDCOLLOPTLIST `""' - local RMDCOLLOPTNAMES `"`.rmdcoll_opts.dumpnames'"' --------------------------------------------------------------------- begin _optlist.dumpnames --- - version 9 - forval i = 1/`.names.arrnels' { = forval i = 1/0 { local namelist `namelist' `.names[`i']' } - local namelist : list uniq namelist - sreturn local namelist `"`namelist'"' = sreturn local namelist `""' - class exit `"`namelist'"' = class exit `""' ----------------------------------------------------------------------- end _optlist.dumpnames --- = local RMDCOLLOPTNAMES `""' - local OPTLIST3 : subinstr local RMDCOLLOPTLIST "(passthru)" "(string asis)", all - local 0 `", `GL_op'"' = local 0 `", "' - syntax [, `OPTLIST1' `OPTLIST2' `OPTLIST3' COLlinear noCONStant *] = syntax [, COLlinear noCONStant *] - local GL_op `"`options'"' = local GL_op `""' - if `"`collinear'"' != "" { = if `""' != "" { local GL_op `"`GL_op' `collinear'"' .collinear = "`collinear'" } - if `"`constant'"' != "" { = if `""' != "" { local GL_op `"`GL_op' `constant'"' .nocons = "`constant'" } - local I 0 - foreach OPT of local MARKOPTNAMES { if `:list sizeof `OPT'' { .mark_list[`++I'] = ._eqspec.new, wtypes(`.wtypes') .mark_list[`I'].parse "" : ``OPT'' .mark_name.Arrpush "`OPT'" } } - local I 0 - foreach OPT of local RMCOLLOPTNAMES { if `:list sizeof `OPT'' { .rmcoll_list[`++I'] = ._eqspec.new, numdep(0) wtypes(`.wtypes') .rmcoll_list[`I'].parse "" : ``OPT'' .rmcoll_name.Arrpush "`OPT'" } } - local I 0 - foreach OPT of local RMDCOLLOPTNAMES { if `:list sizeof `OPT'' { .rmdcoll_list[`++I'] = ._eqspec.new, wtypes(`.wtypes') .rmdcoll_list[`I'].parse "" : ``OPT'' .rmdcoll_name.Arrpush "`OPT'" } } - .n_eq = `EQ_n' = .n_eq = 1 - .gl_if = `"`GL_if'"' = .gl_if = `""' - .gl_in = `"`GL_in'"' = .gl_in = `""' - .gl_wgt = `"`GL_wt'"' = .gl_wgt = `""' - .gl_options = `"`:list retok GL_op'"' = .gl_options = `""' ------------------------------------------------------------------------------ end _eqlist.parse --- - local numstataeqns = `.`o'.eq count' ------------------------------------------------------------------------------- begin _eqlist.eq --- - version 9.2 - args item idx - if "`item'" == "count" { = if "count" == "count" { - sreturn local value `"`.n_eq'"' = sreturn local value `"1"' - class exit `"`s(value)'"' = class exit `"1"' --------------------------------------------------------------------------------- end _eqlist.eq --- = local numstataeqns = 1 - if ("`verbose'"~="") display as text "number of eqns: `numstataeqns'" = if (""~="") display as text "number of eqns: 1" - if (`numstataeqns'==1 & "`distribution'" ~= "multinomial") local mtype univariate = if (1==1 & "" ~= "multinomial") local mtype univariate - if ("`distribution'" == "multinomial") local mtype multinomial = if ("" == "multinomial") local mtype multinomial - if (`numstataeqns'>1 & "`distribution'" ~= "multinomial") local mtype multivariate = if (1>1 & "" ~= "multinomial") local mtype multivariate - assert"`mtype'"~="" = assert"univariate"~="" - local response - local fp - if "`mtype'"=="multivariate" { = if "univariate"=="multivariate" { local nummlwineqns = 0 local valideqns forvalues e = 1/`numstataeqns' { local 0 , `.`o'.eq options `e'' syntax [, EQuation(numlist integer)] local eq `equation' if `:list sizeof eq' == 1 { local valideqns `valideqns' `eq' local name`eq' `.`o'.eq name `e'' local response`eq' `.`o'.eq depvars `e'' local response `response' `response`eq'' local ++nummlwineqns } } local numfpbrackets = `nummlwineqns' forvalues e = 1/`numstataeqns' { local 0 , `.`o'.eq options `e'' syntax [, EQuation(numlist integer)] local eq `equation' if "`eq'" == "" { display as error "equation option not set for `e'" exit 198 } if `:list sizeof eq' == 1 { if ("`verbose'"~="") display as text "Separate coefficients" local fp`eq' `.`o'.eq indepvars `e'' local numfpvars`eq' :list sizeof fp`e' local dups :list dups fp`eq' if "`dups'" ~= "" { display as error "`dups' are duplicated in the fixed part equation `eq'" exit 198 } foreach var of local fp`eq' { local fpname`eq' `fpname`eq'' `var'.`eq' } local pat forvalues a = 1/`nummlwineqns' { if `:list a in eq' local pat `pat' 1 else local pat `pat' 0 } local rpat`eq' `pat' } else { if ("`verbose'"~="") display as text "Common coefficients" if "`:list eq - valideqns'" ~= "" { display as error "invalid equation(s) specified" exit 198 } local ++numfpbrackets local fp`numfpbrackets' `.`o'.eq depvars `e'' `.`o'.eq indepvars `e'' local numfpvars`numfpbrackets' :list sizeof fp`e' local dups :list dups fp`numfpbrackets' if "`dups'" ~= "" { display as error "`dups' are duplicated in the fixed part equation `eq'" exit 198 } foreach var of local fp`e' { local fpname`numfpbrackets' `fpname`numfpbrackets'' `var'.`=subinstr("`eq'", " ", "", .)' } local pat forvalues a = 1/`nummlwineqns' { if `:list a in eq' local pat `pat' 1 else local pat `pat' 0 } local rpat`numfpbrackets' `pat' } } forvalues e = 1/`numfpbrackets' { local fp `fp' `fp`e'' } local numfpvars :list sizeof fp } - if "`mtype'"=="multinomial" { = if "univariate"=="multinomial" { local response1 `.`o'.eq depvars 1' capture tab `response1' local nummlwineqns `=`r(r)' - 1' local numfpbrackets = `nummlwineqns' local valideqns forvalues e = 1/`nummlwineqns' { local valideqns `valideqns' `e' } if ("`verbose'"~="") display as text "Valid Equations: `valideqns'" forvalues e = 2/`numstataeqns' { local 0 , `.`o'.eq options `e'' syntax [, CONtrast(numlist integer)] local cat `contrast' if ("`verbose'"~="") display as text "`cat'" if "`cat'" == "" { display as error "cat option not set for `e'" exit 198 } if "`:list cat - valideqns'" ~= "" { display as error "Invalid contrast(s) specified. The contrast(s) specified in contrasts() must tally > with the contrast(s) in the model, in this case: 1,2,...,`nummlwineqns'" _n exit 198 } if `:list sizeof cat' == 1 { if ("`verbose'"~="") display as text "Separate coefficients" local fp`cat' `.`o'.eq depvars `e'' `.`o'.eq indepvars `e'' local dups :list dups fp`cat' if "`dups'" ~= "" { display as error "`dups' are duplicated in the fixed part contrast `contrast'" exit 198 } } else { if ("`verbose'"~="") display as text "Common coefficients" local ++numfpbrackets local fp`numfpbrackets' `.`o'.eq depvars `e'' `.`o'.eq indepvars `e'' local numfpvars`numfpbrackets' :list sizeof fp`numfpbrackets' local fpname`numfpbrackets' local dups :list dups fp`numfpbrackets' if "`dups'" ~= "" { display as error "`dups' are duplicated in the fixed part contrast `contrast'" exit 198 } capture levelsof `response1', local(responsecats) local catvals local respnum = 1 foreach catn of local responsecats { if "`catn'" ~= "`basecategory'" { if `:list respnum in cat' local catvals `catvals' `catn' local ++respnum } } foreach var of local fp`numfpbrackets' { local fpname`numfpbrackets' `fpname`numfpbrackets'' `var'.`=subinstr("`catvals'", " ", "", .)' } local pat forvalues a = 1/`nummlwineqns' { if `:list a in cat' local pat `pat' 1 else local pat `pat' 0 } local rpat`numfpbrackets' `pat' } } capture levelsof `response1', local(responsecats) local e = 1 foreach cat of local responsecats { if "`cat'" ~= "`basecategory'" { local response`e' `response1' local response `response' `response`e'' local fp`e' `.`o'.eq indepvars 1' `fp`e'' local numfpvars`e' :list sizeof fp`e' local dups :list dups fp`e' if "`dups'" ~= "" { display as error "`dups' are duplicated in the fixed part" exit 198 } local fpname`e' foreach var of local fp`e' { local fpname`e' `fpname`e'' `var'.`cat' } local pat forvalues a = 1/`nummlwineqns' { if `:list a in e' local pat `pat' 1 else local pat `pat' 0 } local rpat`e' `pat' local ++e } } forvalues e = 1/`numfpbrackets' { local fp `fp' `fp`e'' } local numfpvars :list sizeof fp } - if "`mtype'" == "univariate" { = if "univariate" == "univariate" { - local numfpbrackets = `numstataeqns' = local numfpbrackets = 1 - local nummlwineqns = `numstataeqns' = local nummlwineqns = 1 - forvalues e = 1/`numfpbrackets' { = forvalues e = 1/1 { - local name`e' `.`o'.eq name `e'' ------------------------------------------------------------------------------- begin _eqlist.eq --- - version 9.2 - args item idx - if "`item'" == "count" { = if "name" == "count" { sreturn local value `"`.n_eq'"' class exit `"`s(value)'"' } - else if 0 < `idx' & `idx' <= `.n_eq' { = else if 0 < 1 & 1 <= 1 { - .eq_list[`idx'].item `item' = .eq_list[1].item name --------------------------------------------------------------------------- begin _eqspec.item --- - version 9.2 - args item - ._check_eq_item_name item, `item' = ._check_eq_item_name item, name ---------------------------------------------------------- begin _eqspec._check_eq_item_name --- - version 9.2 - capture syntax name(name=c_item) [, NAME DEPvars INDEPvars IF IN WGT OTHER NOCONS OFFset EXPos > ure OPTions ] - if c(rc) error 198 - if `:list sizeof other' { = if 0 { local other other_markvars } - local item `name' `depvars' `indepvars' `if' `in' `wgt' `other' `nocons' `offset' `exposure' ` > options' = local item name - if `:list sizeof item' != 1 { = if 1 != 1 { error 198 } - c_local `c_item' `item' = c_local item name ------------------------------------------------------------ end _eqspec._check_eq_item_name --- - local value `"`.`item''"' = local value `""' - sreturn local value `"`value'"' = sreturn local value `""' - class exit `"`value'"' = class exit `""' ----------------------------------------------------------------------------- end _eqspec.item --- - class exit `"`s(value)'"' = class exit `""' --------------------------------------------------------------------------------- end _eqlist.eq --- = local name1 - local response`e' `.`o'.eq depvars `e'' ------------------------------------------------------------------------------- begin _eqlist.eq --- - version 9.2 - args item idx - if "`item'" == "count" { = if "depvars" == "count" { sreturn local value `"`.n_eq'"' class exit `"`s(value)'"' } - else if 0 < `idx' & `idx' <= `.n_eq' { = else if 0 < 1 & 1 <= 1 { - .eq_list[`idx'].item `item' = .eq_list[1].item depvars --------------------------------------------------------------------------- begin _eqspec.item --- - version 9.2 - args item - ._check_eq_item_name item, `item' = ._check_eq_item_name item, depvars ---------------------------------------------------------- begin _eqspec._check_eq_item_name --- - version 9.2 - capture syntax name(name=c_item) [, NAME DEPvars INDEPvars IF IN WGT OTHER NOCONS OFFset EXPos > ure OPTions ] - if c(rc) error 198 - if `:list sizeof other' { = if 0 { local other other_markvars } - local item `name' `depvars' `indepvars' `if' `in' `wgt' `other' `nocons' `offset' `exposure' ` > options' = local item depvars - if `:list sizeof item' != 1 { = if 1 != 1 { error 198 } - c_local `c_item' `item' = c_local item depvars ------------------------------------------------------------ end _eqspec._check_eq_item_name --- - local value `"`.`item''"' = local value `"normexam"' - sreturn local value `"`value'"' = sreturn local value `"normexam"' - class exit `"`value'"' = class exit `"normexam"' ----------------------------------------------------------------------------- end _eqspec.item --- - class exit `"`s(value)'"' = class exit `"normexam"' --------------------------------------------------------------------------------- end _eqlist.eq --- = local response1 normexam - if _caller() >= 11 { - local 0 `.`o'.eq indepvars `e'' ------------------------------------------------------------------------------- begin _eqlist.eq --- - version 9.2 - args item idx - if "`item'" == "count" { = if "indepvars" == "count" { sreturn local value `"`.n_eq'"' class exit `"`s(value)'"' } - else if 0 < `idx' & `idx' <= `.n_eq' { = else if 0 < 1 & 1 <= 1 { - .eq_list[`idx'].item `item' = .eq_list[1].item indepvars --------------------------------------------------------------------------- begin _eqspec.item --- - version 9.2 - args item - ._check_eq_item_name item, `item' = ._check_eq_item_name item, indepvars ---------------------------------------------------------- begin _eqspec._check_eq_item_name --- - version 9.2 - capture syntax name(name=c_item) [, NAME DEPvars INDEPvars IF IN WGT OTHER NOCONS OFFset EXPos > ure OPTions ] - if c(rc) error 198 - if `:list sizeof other' { = if 0 { local other other_markvars } - local item `name' `depvars' `indepvars' `if' `in' `wgt' `other' `nocons' `offset' `exposure' ` > options' = local item indepvars - if `:list sizeof item' != 1 { = if 1 != 1 { error 198 } - c_local `c_item' `item' = c_local item indepvars ------------------------------------------------------------ end _eqspec._check_eq_item_name --- - local value `"`.`item''"' = local value `"cons standlrt"' - sreturn local value `"`value'"' = sreturn local value `"cons standlrt"' - class exit `"`value'"' = class exit `"cons standlrt"' ----------------------------------------------------------------------------- end _eqspec.item --- - class exit `"`s(value)'"' = class exit `"cons standlrt"' --------------------------------------------------------------------------------- end _eqlist.eq --- = local 0 cons standlrt - syntax varlist(fv) - fvexpand `varlist' = fvexpand cons standlrt - local fpname`e' `r(varlist)' = local fpname1 cons standlrt - fvrevar `r(varlist)' = fvrevar cons standlrt - local fp`e' `r(varlist)' = local fp1 cons standlrt - local newvars :list fp`e' - varlist = local newvars :list fp1 - varlist - capture _rmcoll `fp`e'', noconstant = capture _rmcoll cons standlrt, noconstant - local fp`e' `r(varlist)' = local fp1 cons standlrt - if "`newvars'" ~= "" { = if "" ~= "" { quietly compress `newvars' } - local i = 1 - foreach x in `fp`e'' { = foreach x in cons standlrt { - local xname :word `i' of `fpname`e'' = local xname :word 1 of cons standlrt - if substr("`x'", 1, 2) == "o." { = if substr("cons", 1, 2) == "o." { local fp`e' : list fp`e' - x local fpname`e' : list fpname`e' - xname display as text "note: `xname' omitted because of collinearity" } - else { - if `mlwinversion' < 3 & `:list x in newvars' & "`:type `x''" == "double" { = if < 3 & 0 & "byte" == "double" { <3 invalid name quietly recast float `x', force display as error "`xname' has more precision that MLwiN can handle, forcing to float" } local ++i } } } else { local fpname`e' `.`o'.eq indepvars `e'' local fp`e' `.`o'.eq indepvars `e'' } local dups :list dups fp`e' if "`dups'" ~= "" { display as error "`dups' are duplicated in the fixed part" exit 198 } local numfpvars`e' :list sizeof fp`e' local response `response' `response`e'' local fp `fp' `fp`e'' } --------------------------------------------------------------------------- end runmlwin.Estimates --- if "`e(mcmcnofit)'" == "1" { exit } timer off 99 quietly timer list ereturn scalar time = r(t99) timer clear 99 runmlwin_display, level(`level') `header' `group' `contrast' `fetable' `retable' `sd' `correlations' ` > or' `irr' `rrr' `mode' `median' `zratio' } --------------------------------------------------------------------------------------- end runmlwin --- r(198);