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

Re: st: Returning a p-value for simulation

From   "Martin Weiss" <>
To   <>
Subject   Re: st: Returning a p-value for simulation
Date   Sun, 10 May 2009 10:20:06 +0200

I do not get this solution. Why do I need an e-class "myprobit", given that -probit- itself returns _b and _se anyway?

The initial request by John was to capture t (or rather z in the probit case) statistics and p-values for a later simulation. That sounds to me as if he wants to run the -probit- only once and then process the results further...

----- Original Message ----- From: "Eva Poen" <>
To: <>
Sent: Sunday, May 10, 2009 9:53 AM
Subject: Re: st: Returning a p-value for simulation


If John wishes to return coefficients and associated statistics after
estimation for a simulation he might want employ an eclass program.
This way, he can easily access coefficients and standard errors, and
calculate t-statistics and p-values afterwards. Here is an example:

program myprobit, eclass
  probit y x1 x2

simulate _b _se , reps(1000) seed(123) saving(myprobit, replace
every(50)) : myprobit

use myprobit

foreach v in x1 x2 {
 gen t_`v' = y_b_`v'/y_se_`v'
 gen p_`v' = 2*(1-normal(abs(t_`v'))

Hope this helps,

2009/5/9 John Antonakis <>:
I am running an rclass program that I wish to simulate.

After estimating a probit, I want to save the coefficients, along with the t-stats and the p-values for later simulation. I figured out the former but
not the latter two. What I have so far is:

probit y x1 x2
return scalar b1 =_b[x1]
return scalar b2 =_b[x2]



Prof. John Antonakis
Associate Dean Faculty of Business and Economics
University of Lausanne
Internef #618
CH-1015 Lausanne-Dorigny

Tel ++41 (0)21 692-3438
Fax ++41 (0)21 692-3305

Faculty page:

Personal page:

* For searches and help try:

*   For searches and help try:

*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index