From "Martin Weiss" To Subject st: AW: Root Mean Square Error and Pseudo R square....Please Help Date Mon, 27 Apr 2009 13:25:12 +0200

```<>

Just out of curiosity: Have you simply adopted the -program- which keeps
coming up on the list every other day, or are you the same poster?
(http://www.stata.com/statalist/archive/2009-04/msg01126.html)

There is usually a reason for Stata not to provide a certain number.
-probit- does report a "pseudo"-R square, -ivprobit- does not. -ssc d
fitstat- does not work after -ivprobit-, either.

Why do you want to calculate anything in Excel? Normally, you can use the
returned results and form an expression that you evaluate in a call to
-display-. So no need to leave Stata...

HTH
Martin

-----Ursprüngliche Nachricht-----
Von: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Arun Adhikari
Gesendet: Montag, 27. April 2009 07:31
An: statalist@hsphsun2.harvard.edu

Dear All,

While performing the simulation for Probit model, how could we
calculate the RMSE and Pseudo R square? If it was OLS, we could just
use the formula and could do it in Excel but I could not use the
formula for Probit, since our Y is (0,1). There might be some code
that would help me find these. I would appreciate if anybody could
help me. My simulation so far looks like this. Could you please add
something in it?

.......................................Program..............................
..............................

global numobs 1000             // sample size N
global numsims "500"         // number of simulations
set seed 123456789

capture program drop endoprob

program endoprob // , rclass
version 10.1
drop _all
set obs \$numobs
generate u = rnormal(0)
generate mu = rnormal(0)
generate v = rnormal(0)
//generate x = rnormal(0)
generate z1 = rnormal(0)   // 4 Instruements
generate z2 = rnormal(0)
generate z3 = rnormal(0)
generate z4 = rnormal(0)
// Also be written *drawnorm u mu x1 z1 z2 z3 z4
generate a = 0.6*u

generate x = 0.5 + 0.9*z1 + a
regress x  z1 // endogenous regressor with four instruments
predict px

generate y = 0.5 + px + mu + u > 2    //Reduced Form Equation
ivprobit y (x= z1 )
predict py
end
simulate _b _se y py , ///
reps(\$numsims): endoprob

mean x* y*

......................................................................END...
............................................

Thanking you all in anticipation.

Regards,

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