Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AW: AW: st: RE: overid


From   Marguerite Duponchel <[email protected]>
To   [email protected]
Subject   Re: AW: AW: st: RE: overid
Date   Wed, 28 Apr 2010 11:07:43 +0200

That's what I get, don't understand much to be honest.

. set trace on

. overid, depvar(foreign)
--------------------------------------------------------------------------------------------------------------------
begin overid ---
- version 9.2
- syntax [ , chi2 dfr f all depvar(varname) ]
- if "`e(cmd)'" ~= "ivreg" & "`e(cmd)'" ~= "ivreg2" & "`e(cmd)'" ~= "reg3" &
"`e(cmd)'" ~= "ivprobit" & "`e(cmd)'" ~= "ivtobit" {
= if "ivprobit" ~= "ivreg" & "ivprobit" ~= "ivreg2" & "ivprobit" ~= "reg3" &
"ivprobit" ~= "ivprobit" & "ivprobit" ~= "ivtobit" {
  di in r "overid not supported for command `e(cmd)'"
  error 301
  }
- if "`e(vcetype)'" == "Robust" {
= if "" == "Robust" {
  di in red "Test not valid with robust covariance matrix: use ivreg2"
  exit 198
  }
- if ("`e(cmd)'" == "ivprobit" | "`e(cmd)'" == "ivtobit") &
("`e(method)'"~="twostep") {
= if ("ivprobit" == "ivprobit" | "ivprobit" == "ivtobit") &
("twostep"~="twostep") {
  di in red "Test available for `e(cmd)' only with -twostep- method"
  exit 198
  }
- local weight ""
- if "`e(wexp)'" != "" {
= if "" != "" {
  if "`e(wtype)'"=="pweight" {
  di in red "test not valid with pweights"
  exit 198
  }
  else {
  local weight "[`e(wtype)'`e(wexp)']"
  }
  }
- if "`chi2'`dfr'`f'`all'" == "" {
= if "" == "" {
- local chi2 "chi2"
- }
- if "`e(cmd)'" == "ivreg" | "`e(cmd)'" == "ivreg2" {
= if "ivprobit" == "ivreg" | "ivprobit" == "ivreg2" {
  tempname res iota Nprec K L inst touse sargan regest rssiv b
  mat `b' = e(b)
  local x : colnames `b'
  local x : subinstr local x "_cons" "_cons" , word count(local hc)
  if `hc' == 0 {
  local noc "noc"
  }
  local inst `e(insts)'
  local rssiv = e(rss)
  gen byte `touse' = e(sample)
  mat `b'=diag(e(b))
  local L=colsof(`b')-diag0cnt(`b')
  qui predict double `res' if `touse', res
  if "`e(fwlcons)'"~= "" {
  preserve
  tempname fwl_resid
  if e(fwlcons)==0 {
  local fwlnocons "nocons"
  }
  local noc "noc"
  if "`e(fwl1)'" ~= "" {
  local fwl1 `e(fwl1)'
  }
  else {
  local fwl1 `e(fwl)'
  }
  _estimates hold `regest'
  foreach var of varlist `inst' `res' {
  qui regress `var' `fwl1' if `touse', `fwlnocons'
  qui predict double `fwl_resid' if `touse', resid
  qui replace `var' = `fwl_resid'
  drop `fwl_resid'
  }
  mat `b'=diag(e(b))
  local fwl_ct = colsof(`b')-diag0cnt(`b')
  local L = `L' + `fwl_ct'
  _estimates unhold `regest'
  }
  else {
  local fwl_ct = 0
  }
  qui gen `iota'=1
  qui matrix accum `b' = `iota' `weight' if `touse'
  scalar `Nprec'=`b'[1,1]
  capture {
  _estimates hold `regest'
  regress `res' `inst' `weight' if `touse', `noc'
  scalar `sargan' = `Nprec'*(1.0-e(rss)/`rssiv')
  mat `b'=diag(e(b))
  local K=colsof(`b')-diag0cnt(`b')+`fwl_ct'
  local enn = `e(N)'
  _estimates unhold `regest'
  }
  if `enn' <= `K' {
  di as err "Error: cannot calculate test when number of instruments"
  di as err "       equals or exceeds number of observations"
  error 2001
  }
  return scalar df = `K'-`L'
  if return(df) == 0 {
  di in red _n "There are no overidentifying restrictions."
  exit
  }
  return scalar dfu=`Nprec'-`K'
  return scalar dfr=`Nprec'-`L'
  return scalar N = e(N)
  di in gr _n "Tests of overidentifying restrictions:"
  if "`chi2'`all'" != "" {
  return scalar sargan = `sargan'
  return scalar sarganp= chiprob(return(df),return(sargan))
  di in gr _c "Sargan N*R-sq test " in ye _col(25) %7.3f return(sargan) in gr in
gr "  Chi-sq(" %1.0f in ye return(df) in gr ")" _col
> (47) "P-value = " in ye %5.4f return(sarganp)
  di
  }
  if "`dfr'`all'" != "" {
  return scalar sargan2 = `sargan'*return(dfr)/`Nprec'
  return scalar sargan2p= chiprob(return(df),return(sargan2))
  di in gr _c "Sargan (N-L)*R-sq test " in ye _col(25) %7.3f return(sargan2) in
gr in gr "  Chi-sq(" %1.0f in ye return(df) in gr ")"
>  _col(47) "P-value = " in ye %5.4f return(sargan2p)
  di
  }
  if "`chi2'`dfr'`all'" != "" {
  return scalar basmann = `sargan'*return(dfu)/(`Nprec'-`sargan')
  return scalar basmannp= chiprob(return(df),return(basmann))
  di in gr _c "Basmann test " in ye _col(25) %7.3f return(basmann) in gr in gr "
 Chi-sq(" %1.0f in ye return(df) in gr ")" _col(47)
> "P-value = " in ye %5.4f return(basmannp)
  di
  }
  if "`f'`all'" != "" {
  return scalar sarganf = `sargan'/`Nprec'*return(dfr)/return(df)
  return scalar sarganfp= Ftail(return(df),return(dfr),return(sarganf))
  di in gr _c "Sargan pseudo-F test " in ye _col(25) %7.3f return(sarganf) in gr
in gr "  F(" %1.0f in ye return(df) in gr "," %1.0f
> in ye return(dfr) in gr ")" _col(47) "P-value = " in ye %5.4f return(sarganfp)
  di
  return scalar basmannf = `sargan'*return(dfu)/(`Nprec'-`sargan')/return(df)
  return scalar basmannfp= Ftail(return(df),return(dfu),return(basmannf))
  di in gr _c "Basmann pseudo-F test " in ye _col(25) %7.3f return(basmannf) in
gr in gr "  F(" %1.0f in ye return(df) in gr "," %1.0
> f in ye return(dfu) in gr ")" _col(47) "P-value = " in ye %5.4f
return(basmannfp)
  di
  }
  }
- if "`e(cmd)'" == "reg3" {
= if "ivprobit" == "reg3" {
  tempname esigma beta eps
  tempvar iota touse
  mat __sigma = e(Sigma)
  mat `beta' = e(b)
  mat __V = e(V)
  g byte `iota' = 1 if e(sample)
  local exog `e(exog)' `iota'
  local neq `e(k_eq)'
  local depvar `e(depvar)'
  foreach w of local depvar {
  tempvar eps`w'
  predict double `eps`w'', resid equation(`w')
  local epss "`epss' `eps`w''"
  }
  local nbeta = colsof(`beta')
  g byte `touse' = e(sample)
  mata: overidreg3("`epss'","`exog'",`nbeta',"`touse'")
  local nbeta = `nbeta' - nconstr
  di in gr _n "Number of equations : " `neq'
  di in gr "Total number of exogenous variables in system : " nexog
  di in gr "Number of estimated coefficients : " `nbeta'
  if nconstr > 0 {
  di in gr "Net of " nconstr " linear constraints / dependencies"
  }
  di in gr "Hansen-Sargan overidentification statistic : " %9.3f crit
  di in gr "Under H0, distributed as Chi-sq(" df "), pval = " %6.4f chi2
  return scalar crit = crit
  return scalar df = df
  return scalar p = chi2
  return scalar nexog = nexog
  return scalar nbeta = `nbeta'
  return scalar nconstr = nconstr
  return scalar neq = `neq'
  return local cmd = "reg3"
  }
- if "`e(cmd)'" == "ivprobit" {
= if "ivprobit" == "ivprobit" {
- tempname regest b b2 overid overidp df nobs
- tempvar touse
- gen byte `touse'=e(sample)
= gen byte __000007=e(sample)
- mat `b'=e(b)
= mat __000001=e(b)
- local regressors : colnames `b'
= local regressors : colnames __000001
- local dirt "_cons"
- local regressors : list regressors - dirt
- local endo "`e(instd)'"
= local endo "mpg"
- local insts "`e(insts)'"
= local insts "displacement length weight turn"
- local exexog : list insts - regressors
- local inexog : list regressors - endo
- local inexog : list inexog - exexog
- if "`depvar'"=="" {
= if "foreign"=="" {
  local depvar : word 1 of `e(depvar)'
  }
- if "`depvar'" =="" {
= if "foreign" =="" {
  di in red "Error: you must use the depvar() option"
  exit 198
  }
- local asis "`e(asis)'"
= local asis ""
- local wtopt "[`e(wtype)'`e(wexp)']"
= local wtopt "[]"
- _estimates hold `regest', restore
= _estimates hold __000000, restore
- ivprobit2 `depvar' `inexog' (`endo' = `exexog') if `touse' `wtopt', twostep
`asis'
= ivprobit2 foreign displacement (mpg = length weight turn) if __000007 [],
twostep
 
--------------------------------------------------------------------------------------------------------
begin overid.ivprobit2 ---
  - local n 0
  - gettoken lhs 0 : 0, parse(" ,[") match(paren)
  - IsStop `lhs'
  = IsStop foreign
   
---------------------------------------------------------------------------------------------------------
begin overid.IsStop ---
    - if `"`0'"' == "[" {
    = if `"foreign"' == "[" {
      sret local stop 1
      exit
      }
    - if `"`0'"' == "," {
    = if `"foreign"' == "," {
      sret local stop 1
      exit
      }
    - if `"`0'"' == "if" {
    = if `"foreign"' == "if" {
      sret local stop 1
      exit
      }
    - if `"`0'"' == "in" {
    = if `"foreign"' == "in" {
      sret local stop 1
      exit
      }
    - if `"`0'"' == "" {
    = if `"foreign"' == "" {
      sret local stop 1
      exit
      }
    - else {
    - sret local stop 0
    - }
   
-----------------------------------------------------------------------------------------------------------
end overid.IsStop ---
  - if `s(stop)' {
  = if 0 {
    error 198
    }
  - while `s(stop)'==0 {
  = while 0==0 {
  - if "`paren'"=="(" {
  = if ""=="(" {
    local n = `n' + 1
    if `n'>1 {
    capture noi error 198
    di as error `"syntax is "(all instrumented variables = instrument
variables)""'
    exit 198
    }
    gettoken p lhs : lhs, parse(" =")
    while "`p'"!="=" {
    if "`p'"=="" {
    capture noi error 198
    di as error `"syntax is "(all instrumented variables = instrument
variables)""'
    di as error `"the equal sign "=" is required"'
    exit 198
    }
    local end`n' `end`n'' `p'
    gettoken p lhs : lhs, parse(" =")
    }
    tsunab end`n' : `end`n''
    tsunab exog`n' : `lhs'
    }
  - else {
  - local exog `exog' `lhs'
  = local exog  foreign
  - }
  - gettoken lhs 0 : 0, parse(" ,[") match(paren)
  - IsStop `lhs'
  = IsStop displacement
   
---------------------------------------------------------------------------------------------------------
begin overid.IsStop ---
    - if `"`0'"' == "[" {
    = if `"displacement"' == "[" {
      sret local stop 1
      exit
      }
    - if `"`0'"' == "," {
    = if `"displacement"' == "," {
      sret local stop 1
      exit
      }
    - if `"`0'"' == "if" {
    = if `"displacement"' == "if" {
      sret local stop 1
      exit
      }
    - if `"`0'"' == "in" {
    = if `"displacement"' == "in" {
      sret local stop 1
      exit
      }
    - if `"`0'"' == "" {
    = if `"displacement"' == "" {
      sret local stop 1
      exit
      }
    - else {
    - sret local stop 0
    - }
   
-----------------------------------------------------------------------------------------------------------
end overid.IsStop ---
  - }
  - while `s(stop)'==0 {
  = while 0==0 {
  - if "`paren'"=="(" {
  = if ""=="(" {
    local n = `n' + 1
    if `n'>1 {
    capture noi error 198
    di as error `"syntax is "(all instrumented variables = instrument
variables)""'
    exit 198
    }
    gettoken p lhs : lhs, parse(" =")
    while "`p'"!="=" {
    if "`p'"=="" {
    capture noi error 198
    di as error `"syntax is "(all instrumented variables = instrument
variables)""'
    di as error `"the equal sign "=" is required"'
    exit 198
    }
    local end`n' `end`n'' `p'
    gettoken p lhs : lhs, parse(" =")
    }
    tsunab end`n' : `end`n''
    tsunab exog`n' : `lhs'
    }
  - else {
  - local exog `exog' `lhs'
  = local exog foreign displacement
  - }
  - gettoken lhs 0 : 0, parse(" ,[") match(paren)
  - IsStop `lhs'
  = IsStop mpg = length weight turn
   
---------------------------------------------------------------------------------------------------------
begin overid.IsStop ---
    - if `"`0'"' == "[" {
    = if `"mpg = length weight turn"' == "[" {
      sret local stop 1
      exit
      }
    - if `"`0'"' == "," {
    = if `"mpg = length weight turn"' == "," {
      sret local stop 1
      exit
      }
    - if `"`0'"' == "if" {
    = if `"mpg = length weight turn"' == "if" {
      sret local stop 1
      exit
      }
    - if `"`0'"' == "in" {
    = if `"mpg = length weight turn"' == "in" {
      sret local stop 1
      exit
      }
    - if `"`0'"' == "" {
    = if `"mpg = length weight turn"' == "" {
      sret local stop 1
      exit
      }
    - else {
    - sret local stop 0
    - }
   
-----------------------------------------------------------------------------------------------------------
end overid.IsStop ---
  - }
  - while `s(stop)'==0 {
  = while 0==0 {
  - if "`paren'"=="(" {
  = if "("=="(" {
  - local n = `n' + 1
  = local n = 0 + 1
  - if `n'>1 {
  = if 1>1 {
    capture noi error 198
    di as error `"syntax is "(all instrumented variables = instrument
variables)""'
    exit 198
    }
  - gettoken p lhs : lhs, parse(" =")
  - while "`p'"!="=" {
  = while "mpg"!="=" {
  - if "`p'"=="" {
  = if "mpg"=="" {
    capture noi error 198
    di as error `"syntax is "(all instrumented variables = instrument
variables)""'
    di as error `"the equal sign "=" is required"'
    exit 198
    }
  - local end`n' `end`n'' `p'
  = local end1  mpg
  - gettoken p lhs : lhs, parse(" =")
  - }
  - while "`p'"!="=" {
  = while "="!="=" {
    if "`p'"=="" {
    capture noi error 198
    di as error `"syntax is "(all instrumented variables = instrument
variables)""'
    di as error `"the equal sign "=" is required"'
    exit 198
    }
    local end`n' `end`n'' `p'
    gettoken p lhs : lhs, parse(" =")
    }
  - tsunab end`n' : `end`n''
  = tsunab end1 : mpg
   
----------------------------------------------------------------------------------------------------------------
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 end1 mpg
    - local n : word count `varlist'
    = local n : word count mpg
    - if `n'>=`min' & `n'<=`max' { exit }
    = if 1>=1 & 1<=32000 { exit }
   
------------------------------------------------------------------------------------------------------------------
end tsunab ---
  - tsunab exog`n' : `lhs'
  = tsunab exog1 :  length weight turn
   
----------------------------------------------------------------------------------------------------------------
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 exog1 length weight turn
    - local n : word count `varlist'
    = local n : word count length weight turn
    - if `n'>=`min' & `n'<=`max' { exit }
    = if 3>=1 & 3<=32000 { exit }
   
------------------------------------------------------------------------------------------------------------------
end tsunab ---
  - }
  - else {
    local exog `exog' `lhs'
    }
  - gettoken lhs 0 : 0, parse(" ,[") match(paren)
  - IsStop `lhs'
  = IsStop if
   
---------------------------------------------------------------------------------------------------------
begin overid.IsStop ---
    - if `"`0'"' == "[" {
    = if `"if"' == "[" {
      sret local stop 1
      exit
      }
    - if `"`0'"' == "," {
    = if `"if"' == "," {
      sret local stop 1
      exit
      }
    - if `"`0'"' == "if" {
    = if `"if"' == "if" {
    - sret local stop 1
    - exit
   
-----------------------------------------------------------------------------------------------------------
end overid.IsStop ---
  - }
  - while `s(stop)'==0 {
  = while 1==0 {
    if "`paren'"=="(" {
    local n = `n' + 1
    if `n'>1 {
    capture noi error 198
    di as error `"syntax is "(all instrumented variables = instrument
variables)""'
    exit 198
    }
    gettoken p lhs : lhs, parse(" =")
    while "`p'"!="=" {
    if "`p'"=="" {
    capture noi error 198
    di as error `"syntax is "(all instrumented variables = instrument
variables)""'
    di as error `"the equal sign "=" is required"'
    exit 198
    }
    local end`n' `end`n'' `p'
    gettoken p lhs : lhs, parse(" =")
    }
    tsunab end`n' : `end`n''
    tsunab exog`n' : `lhs'
    }
    else {
    local exog `exog' `lhs'
    }
    gettoken lhs 0 : 0, parse(" ,[") match(paren)
    IsStop `lhs'
    }
  - local 0 `"`lhs' `0'"'
  = local 0 `"if  __000007 [], twostep "'
  - tsunab exog : `exog'
  = tsunab exog : foreign displacement
   
----------------------------------------------------------------------------------------------------------------
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 exog foreign displacement
    - local n : word count `varlist'
    = local n : word count foreign displacement
    - if `n'>=`min' & `n'<=`max' { exit }
    = if 2>=1 & 2<=32000 { exit }
   
------------------------------------------------------------------------------------------------------------------
end tsunab ---
  - tokenize `exog'
  = tokenize foreign displacement
  - local lhs "`1'"
  = local lhs "foreign"
  - local 1 " "
  - local exog `*'
  = local exog   displacement
  - Subtract inst : "`exog1'" "`exog'"
  = Subtract inst : "length weight turn" "displacement"
   
-------------------------------------------------------------------------------------------------------
begin overid.Subtract ---
    - args cleaned colon full dirt
    - tokenize `dirt'
    = tokenize displacement
    - local i 1
    - while "``i''" != "" {
    = while "displacement" != "" {
    - local full : subinstr local full "``i''" "", word all
    = local full : subinstr local full "displacement" "", word all
    - local i = `i' + 1
    = local i = 1 + 1
    - }
    - while "``i''" != "" {
    = while "" != "" {
      local full : subinstr local full "``i''" "", word all
      local i = `i' + 1
      }
    - tokenize `full'
    = tokenize length weight turn
    - c_local `cleaned' `*'
    = c_local inst length weight turn
   
---------------------------------------------------------------------------------------------------------
end overid.Subtract ---
  - local lhsname `lhs'
  = local lhsname foreign
  - local lhsstr : subinstr local lhsname "." "_"
  - local exogname `exog'
  = local exogname displacement
  - local end1name `end1'
  = local end1name mpg
  - local instname `inst'
  = local instname length weight turn
  - _find_tsops `lhs' `exog' `end1' `inst'
  = _find_tsops foreign displacement mpg length weight turn
   
-----------------------------------------------------------------------------------------------------------
begin _find_tsops ---
    - local tsops 0
    - tokenize `*'
    = tokenize foreign displacement mpg length weight turn
    - while (`tsops' == 0 & "`1'" != "") {
    = while (0 == 0 & "foreign" != "") {
    - local tsops = ( index("`1'", ".") > 0 )
    = local tsops = ( index("foreign", ".") > 0 )
    - macro shift
    - }
    - while (`tsops' == 0 & "`1'" != "") {
    = while (0 == 0 & "displacement" != "") {
    - local tsops = ( index("`1'", ".") > 0 )
    = local tsops = ( index("displacement", ".") > 0 )
    - macro shift
    - }
    - while (`tsops' == 0 & "`1'" != "") {
    = while (0 == 0 & "mpg" != "") {
    - local tsops = ( index("`1'", ".") > 0 )
    = local tsops = ( index("mpg", ".") > 0 )
    - macro shift
    - }
    - while (`tsops' == 0 & "`1'" != "") {
    = while (0 == 0 & "length" != "") {
    - local tsops = ( index("`1'", ".") > 0 )
    = local tsops = ( index("length", ".") > 0 )
    - macro shift
    - }
    - while (`tsops' == 0 & "`1'" != "") {
    = while (0 == 0 & "weight" != "") {
    - local tsops = ( index("`1'", ".") > 0 )
    = local tsops = ( index("weight", ".") > 0 )
    - macro shift
    - }
    - while (`tsops' == 0 & "`1'" != "") {
    = while (0 == 0 & "turn" != "") {
    - local tsops = ( index("`1'", ".") > 0 )
    = local tsops = ( index("turn", ".") > 0 )
    - macro shift
    - }
    - while (`tsops' == 0 & "`1'" != "") {
    = while (0 == 0 & "" != "") {
      local tsops = ( index("`1'", ".") > 0 )
      macro shift
      }
    - return scalar tsops = `tsops'
    = return scalar tsops = 0
   
-------------------------------------------------------------------------------------------------------------
end _find_tsops ---
  - if `r(tsops)' {
  = if 0 {
    qui tsset
    tsrevar `lhs'
    local lhs `r(varlist)'
    tsrevar `end1'
    local end1 `r(varlist)'
    tsrevar `exog'
    local exog `r(varlist)'
    tsrevar `inst'
    local inst `r(varlist)'
    }
  - foreach x in end1 exog inst {
  - local old`x' ``x''
  = local oldend1 mpg
  - qui _rmcoll ``x''
  = qui _rmcoll mpg
  - local `x' "`r(varlist)'"
  = local end1 "mpg"
  - local dropped : list old`x' - `x'
  = local dropped : list oldend1 - end1
  - foreach y of local dropped {
    local j : list posof "`y'" in old`x'
    local y2 : word `j' of ``x'name'
    }
  - }
  - local old`x' ``x''
  = local oldexog displacement
  - qui _rmcoll ``x''
  = qui _rmcoll displacement
  - local `x' "`r(varlist)'"
  = local exog "displacement"
  - local dropped : list old`x' - `x'
  = local dropped : list oldexog - exog
  - foreach y of local dropped {
    local j : list posof "`y'" in old`x'
    local y2 : word `j' of ``x'name'
    }
  - }
  - local old`x' ``x''
  = local oldinst length weight turn
  - qui _rmcoll ``x''
  = qui _rmcoll length weight turn
  - local `x' "`r(varlist)'"
  = local inst "length weight turn"
  - local dropped : list old`x' - `x'
  = local dropped : list oldinst - inst
  - foreach y of local dropped {
    local j : list posof "`y'" in old`x'
    local y2 : word `j' of ``x'name'
    }
  - }
  - syntax [if] [in] [fw pw iw / ] , [ TWOstep Robust
invalid syntax
 
----------------------------------------------------------------------------------------------------------
end overid.ivprobit2 ---
  mat `b2'=e(b)
  vecsort `b'
  vecsort `b2'
  local cob=colsof(`b')
  forvalues i=1/`cob' {
  if reldif(`b'[1,`i'],`b2'[1,`i']) > 1e-5 {
  di in red "overid error: internal reestimation of eqn differs from original"
  exit 198
  }
  }
  scalar `overid'=e(overid)
  scalar `overidp'=e(overidp)
  scalar `df'=e(overiddf)
  scalar `nobs'=e(N)
  _estimates unhold `regest'
  return scalar overid=`overid'
  return scalar overidp=`overidp'
  return scalar df=`df'
  return scalar N=`nobs'
  }



Quoting Martin Weiss <[email protected]>:

>
> <>
>
>
>
> *************
> set trace on
> *************
>
> and see where Stata gets stuck.
>
>
> HTH
> Martin
>
>
> -----Ursprüngliche Nachricht-----
> Von: [email protected]
> [mailto:[email protected]] Im Auftrag von Marguerite
> Duponchel
> Gesendet: Mittwoch, 28. April 2010 10:42
> An: [email protected]
> Betreff: Re: AW: st: RE: overid
>
> it gives me: invalid syntax
>
> Quoting Martin Weiss <[email protected]>:
>
> >
> > <>
> >
> >
> > What does this example code give you?
> >
> > *************
> > sysuse auto, clear
> > ivprobit foreign displacement (mpg=length weight turn), twostep
> > overid, depvar(foreign)
> > *************
> >
> >
> >
> > HTH
> > Martin
> >
> > -----Ursprüngliche Nachricht-----
> > Von: [email protected]
> > [mailto:[email protected]] Im Auftrag von Marguerite
> > Duponchel
> > Gesendet: Mittwoch, 28. April 2010 10:27
> > An: [email protected]
> > Betreff: RE: st: RE: overid
> >
> > I downloaded
> >
> > *! overid V2.0.3 4Feb2007
> > *! Authors C F Baum, Vince Wiggins, Steve Stillman, Mark Schaffer
> >
> > which seems to work fine on Stata 9.2 and support ivprobit.
> >
> > I run an ivprobit with the twostep option.
> >
> > However "overid, depvar(varname)" gives a syntax error message.
> >
> > My ivprobit is the version 1.1.11.
> >
> >
> > Quoting Nick Cox <[email protected]>:
> >
> > > ... and that Stata can see, a redundant qualification in this instance,
> > > but not necessarily others.
> > >
> > > Nick
> > > [email protected]
> > >
> > > Martin Weiss
> > >
> > > *************
> > > ssc d witch
> > > *************
> > >
> > > can tell you which copies you have on your computer...
> > >
> > > Marguerite Duponchel
> > >
> > > problem is that I get an error message while trying to uninstall overid
> > >
> > > . ssc uninstall overid
> > > criterion matches more than one package
> > >
> > > Quoting Nick Cox <[email protected]>:
> > >
> > > > Make sure that you remove the files that are problematic _and_ drop
> > > any
> > > > -program- in memory.
> > > >
> > > > Nick
> > > > [email protected]
> > > >
> > > > Marguerite Duponchel
> > > >
> > > > I am trying to run the overid command and I get this error message:
> > > >
> > > > .overid
> > > > this is version 9.2 of Stata; it cannot run version 10.0 programs
> > > >      You can purchase the latest version of Stata by visiting
> > > > http://www.stata.com.
> > > > (error occurred while loading overid.ado)
> > > >
> > > > I tried to replace the file with earlier version but it does not work,
> > > > the same
> > > > error message appears.
> > >
> > > *
> > > *   For searches and help try:
> > > *   http://www.stata.com/help.cgi?search
> > > *   http://www.stata.com/support/statalist/faq
> > > *   http://www.ats.ucla.edu/stat/stata/
> > >
> > > --
> > > Ce message a ete verifie par MailScanner
> > > pour des virus ou des polluriels et rien de
> > > suspect n'a ete trouve.
> > >
> >
> >
> > --
> > Marguerite Duponchel
> >
> > ----------------------------------------------------------------
> > This message was sent using IMP, the Internet Messaging Program.
> >
> > --
> > Ce message a ete verifie par MailScanner
> > pour des virus ou des polluriels et rien de
> > suspect n'a ete trouve.
> >
> > *
> > *   For searches and help try:
> > *   http://www.stata.com/help.cgi?search
> > *   http://www.stata.com/support/statalist/faq
> > *   http://www.ats.ucla.edu/stat/stata/
> >
> >
> > *
> > *   For searches and help try:
> > *   http://www.stata.com/help.cgi?search
> > *   http://www.stata.com/support/statalist/faq
> > *   http://www.ats.ucla.edu/stat/stata/
> >
> > --
> > Ce message a ete verifie par MailScanner
> > pour des virus ou des polluriels et rien de
> > suspect n'a ete trouve.
> >
>
>
> --
> Marguerite Duponchel
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
>
> --
> Ce message a ete verifie par MailScanner
> pour des virus ou des polluriels et rien de
> suspect n'a ete trouve.
>
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
>
>
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
>
> --
> Ce message a ete verifie par MailScanner
> pour des virus ou des polluriels et rien de
> suspect n'a ete trouve.
>


--
Marguerite Duponchel

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

-- 
Ce message a ete verifie par MailScanner
pour des virus ou des polluriels et rien de
suspect n'a ete trouve.

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index