Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

st: mvprobit within program define


From   Zhi Su <su.zh@husky.neu.edu>
To   statalist <statalist@hsphsun2.harvard.edu>
Subject   st: mvprobit within program define
Date   Wed, 6 Jul 2011 22:27:26 -0400

Dear Statalists,
  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!

-- 
Zhi Su
348 Holmes Hall
Northeastern University
360 Huntington Avenue
Boston, MA 02115
Office:1-617-373-2316
email:su.zh@husky.neu.edu
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index