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]

st: RE: mvprobit within program define


From   Nick Cox <[email protected]>
To   "'[email protected]'" <[email protected]>
Subject   st: RE: mvprobit within program define
Date   Thu, 7 Jul 2011 11:34:16 +0100

Daniel Klein gave very good advice. 

In addition, I note that this program invokes a local macro -basic- which is never defined. 

I guess that you misunderstand local macros. If local macro -basic- is defined somewhere else, that is quite immaterial. -NHreg- can't see it. 

Nick 
[email protected] 

Zhi Su

  I need to define a program that can return the observations that are
used in multivariate probit model. Here is the program I write

  capture program drop NHreg
  program define NHreg,eclass
  mvprobit (T1=`basic') (T2=`basic') (T3=`basic') (T4=`basic'),robust
  ereturn scalar O=e(N)
  end

  Then in stata I run written command
  NHreg
 Stata return " J():  3204  matrix found where scalar required
                 <istmt>:     -  function returned error
  "
   Do anyone know what is wrong here?
   Thank you!


*
*   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