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,
Arun Adhikari
*
* 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/