Statalist


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

Re: st: Returning a p-value for simulation


From   Tirthankar Chakravarty <[email protected]>
To   [email protected]
Subject   Re: st: Returning a p-value for simulation
Date   Sat, 9 May 2009 23:47:33 +0100

See the code below:

/* Get p-values for z-scores */
sysuse auto, clear
probit foreign weight mpg
local varextract weight mpg
foreach x of local varextract {
	local z = _b["`x'"]/_se["`x'"]
	di in y "The p-value for `x'  is: "  in g 2*(1-normal(abs(`z')))
}

An (excellent) STB by Maarten Buis on this very topic can be found at:
http://home.fsw.vu.nl/m.buis/wp/pvalue.html

T

On Sat, May 9, 2009 at 11:19 PM, John Antonakis <[email protected]> wrote:
> 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/
>



-- 
To every ω-consistent recursive class κ of formulae there correspond
recursive class signs r, such that neither v Gen r nor Neg(v Gen r)
belongs to Flg(κ) (where v is the free variable of r).

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