夏目贵志 发表于 2016-10-11 22:29 
运行这个命令之前运行一下set trace on。然后把结果贴出来看看呢?
mixlogit choice delta, group(obs) rand(distobus area)
--------------------------------------------------------------------------------------------------------------------- begin mixlogit ---
- version 9.2
- if replay() {
if (`"`e(cmd)'"' != "mixlogit") error 301
Replay `0'
}
- else Estimate `0'
= else Estimate choice delta, group(obs) rand(distobus area)
---------------------------------------------------------------------------------------------------------- begin mixlogit.Estimate ---
- syntax varlist [if] [in] [fweight pweight iweight/], GRoup(varname) RAND(varlist) [ ID(varname) LN(integer 0) CORR NREP(integer 50)
> BURN(integer 15) Robust CLuster(varname) FRom(string) Level(integer `c(level)') NUMerical TRace GRADient HESSian SHOWSTEP ITERate(pass
> thru) TOLerance(passthru) LTOLerance(passthru) GTOLerance(passthru) NRTOLerance(passthru) CONSTraints(passthru) TECHnique(passthru) DI
> Fficult ]
= syntax varlist [if] [in] [fweight pweight iweight/], GRoup(varname) RAND(varlist) [ ID(varname) LN(integer 0) CORR NREP(integer 50)
> BURN(integer 15) Robust CLuster(varname) FRom(string) Level(integer 95) NUMerical TRace GRADient HESSian SHOWSTEP ITERate(passthru) TO
> Lerance(passthru) LTOLerance(passthru) GTOLerance(passthru) NRTOLerance(passthru) CONSTraints(passthru) TECHnique(passthru) DIFficult
> ]
- local mlopts `trace' `gradient' `hessian' `showstep' `iterate' `tolerance' `ltolerance' `gtolerance' `nrtolerance' `constraints' `te
> chnique' `difficult'
= local mlopts
- if ("`technique'" == "technique(bhhh)") {
= if ("" == "technique(bhhh)") {
di in red "technique(bhhh) is not allowed."
exit 498
}
- capture confirm numeric var `group'
= capture confirm numeric var obs
- if _rc != 0 {
di in r "The group variable must be numeric"
exit 498
}
- if ("`id'" != "") {
= if ("" != "") {
capture confirm numeric var `id'
if _rc != 0 {
di in r "The id variable must be numeric"
exit 498
}
}
- if ("`cluster'" != "") {
= if ("" != "") {
capture confirm numeric var `cluster'
if _rc != 0 {
di in r "The cluster variable must be numeric"
exit 498
}
}
- marksample touse
- markout `touse' `group' `rand' `id' `cluster'
= markout __000000 obs distobus area
- if ("`weight'" == "pweight" & "`robust'" == "" & "`cluster'" == "") local robust robust
= if ("" == "pweight" & "" == "" & "" == "") local robust robust
- if ("`weight'" != "") local wgt "[`weight' = `exp']"
= if ("" != "") local wgt "[ = ]"
- gettoken lhs fixed : varlist
- local rhs `fixed' `rand'
= local rhs delta distobus area
- qui clogit `lhs' `rhs' if `touse' `wgt', group(`group')
= qui clogit choice delta distobus area if __000000 , group(obs)
------------------------------------------------------------------------------------------------------------------- begin clogit ---
- if _caller() >= 11 {
local vv : di "version " string(_caller()) ":"
}
- version 8.2, missing
- if _by() {
local by "by `_byvars'`_byrc0':"
}
- if _caller() < 8.2 {
`by' _clogit `0'
exit
}
- qui syntax [anything] [fw iw pw] [if] [in] , [ GRoup(varname) STrata(varname) VCE(passthru) CLuster(varname) DOOPT * ]
- if `"`vce'"' != "" {
= if `""' != "" {
local k = ("`strata'" != "") + ("`group'" != "")
if `k' == 2 {
di as err "strata() and group() may not be " _c
di as err "specified at the same time"
exit 198
}
else if `k' == 0 {
di as err "group() required"
exit 198
}
else {
local group `group'`strata'
}
local group0 `group'
tempname id
_vce_cluster clogit, groupvar(`group') newgroupvar(`id') groptname(group) `vce' cluster(`cluster')
local vce `"`s(vce)'"'
local idopt `s(idopt)'
local clopt `s(clopt)'
local gropt `s(gropt)'
local bsgropt `s(bsgropt)'
if "`weight'" != "" {
local wgt [`weight'`exp']
}
local vceopts jkopts(`clopt') bootopts(`clopt' `idopt' `bsgropt') mark(GRoup OFFset CLuster)
`by' _vce_parserun clogit, `vceopts' : `anything' `wgt' `if' `in', `gropt' `vce' `options'
if "`s(exit)'" != "" {
ereturn local group `group'
ereturn local cluster `cluster'
if "`cluster'" == "" {
local cmd1 `"`e(command)'"'
local cmd2 : subinstr local cmd1 "`id'" "`group'"
ereturn local command `"`cmd2'"'
}
ereturn local cmdline `"clogit `0'"'
exit
}
}
- if replay() {
if "`e(cmd)'" != "clogit" {
error 301
}
if "`:colnames(e(b))'" == "" | !inlist("`e(opt)'", "ml", "moptimize") {
_clogit `0'
exit
}
if _by() {
error 190
}
Display `0'
error `e(rc)'
exit
}
- `vv' `by' clogit_82 `0'
= clogit_82 choice delta distobus area if __000000 , group(obs)
------------------------------------------------------------------------------------------------------- begin clogit.clogit_82 ---
- version 8.2, missing
- syntax varlist(numeric ts fv) [fw iw pw] [if] [in] [, OR FROM(string) Level(cilevel) OFFset(varname numeric) GRoup(varname) STra
> ta(varname) Robust CLuster(varname) noLOg noDISPLAY noHEADer SCore(string) noNEST VCE(passthru) DOOPT* ]
- local tsops = "`s(tsops)'" == "true"
= local tsops = "" == "true"
- if `tsops' {
= if 0 {
_xt, trequired
local tvar `"`r(tvar)'"'
if "`r(ivar)'" != "`group'" {
di as err "{p 0 2 2"} "panel variable and group() option are inconsistent;{break}" "time-series operators require that the {opt
> group()} variable is also " "{helpb xtset} as the panel variable" "{p_end}"
exit 459
}
}
- local fvops = "`s(fvops)'" == "true" | _caller() >= 11
= local fvops = "" == "true" | _caller() >= 11
- if `fvops' {
= if 0 {
if _caller() < 11 {
local vv "version 11:"
}
else local vv : di "version " string(_caller()) ":"
local mm e2
local negh negh
local ml_method e2
local fvexp "expand"
}
- else {
- local vv "version 8.1:"
- local mm d2
- }
- if `:length local vce' {
= if 0 {
_vce_parse, argopt(CLuster) opt(OIM Robust OPG) old : [`weight'`exp'], `vce' `robust' cluster(`cluster')
local cluster `r(cluster)'
local robust `r(robust)'
if "`robust'" != "" {
local vce
}
}
- _get_diopts diopts options, `options'
= _get_diopts diopts options,