Page 1 of 1
How to compute p-value with Empirical Distribution
Posted: Sun Aug 16, 2009 11:05 pm
by tcfoon
Dear All,
I would like to know how can I compute the p-value from an empirical distribution generated from bootstrapping. I found some existing post in this Forum on p-value but all of them are computed based on the theoretical distribution.
Simply, what is the programming code if I have a distribution of 1000 F-statistics.
Thank you,
CF Tang
Re: How to compute p-value with Empirical Distribution
Posted: Mon Aug 17, 2009 2:44 am
by theologos
Hi,
I think the solution to your problem is quite easy. Simply remember the definition of the p-value and that’s it. The following paper will help you since the authors perform a similar task. (page 619)
http://journals.cambridge.org/action/di ... id=1389068
regards
Re: How to compute p-value with Empirical Distribution
Posted: Fri Sep 30, 2011 6:03 am
by Amber
Dear Gareth,
I also have the same problem as Tang. But in my case, it is just simply calculate a given dot's p-value of the empirical distribution.
Is the p-value for the given dot (suppose it is 2) also the percentile in the empirical distribution? Or different? It so, would you please kindly teach me the code?
I really appreciate!
Amber
How to compute p-value with Empirical Distribution
Posted: Fri Sep 30, 2011 6:54 am
by EViews Gareth
I don't understand your question.
Re: How to compute p-value with Empirical Distribution
Posted: Fri Sep 30, 2011 7:02 am
by Amber
Dear Gareth,
I have run the bootstrap for constant term of the regression for 1000 times, and get the distribution for constant term.
Now I want to get the p-value for the empirically regressed constant term (for instance 1.9) on the bootstrapped constant distribution, how can I code it?
I have tried:
smpl if constant>1.9
scalar pval=@obs(constant)/1000
Is it correct?
Thanks!
Amber
Re: How to compute p-value with Empirical Distribution
Posted: Fri Sep 30, 2011 7:49 am
by EViews Gareth
Why don't you state mathematically what you're trying to do, then we can decide if your code matches up with it.
Re: How to compute p-value with Empirical Distribution
Posted: Fri Sep 30, 2011 8:55 am
by Amber
Dear Gareth, 1. I ran regression y=c+beta*x, and get the c as empirical_c.
2. I bootstrapped 1000 times on residuals from step 1, to get 1000 bootstrapped c. And also get the bootstrap distribution for boot_c.
3. I want to get the p-value/percentile of empirical c in boot_c distribution. And this is the step I got stuck.
Hope this makes it a bit clearer.
Cheers,
Amber