Statalist


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

Re: st: Returning a p-value for simulation


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
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...

HTH
Martin
_______________
----- Original Message ----- From: "Eva Poen" <[email protected]>
To: <[email protected]>
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
end

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,
Eva


2009/5/9 John Antonakis <[email protected]>:
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]

Thanks,
John.

--
____________________________________________________

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

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

Faculty page:
http://www.hec.unil.ch/people/jantonakis&cl=en

Personal page:
http://www.hec.unil.ch/jantonakis
____________________________________________________

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


*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index