[R] Simulating the p-value of a test statistic

markleeds at verizon.net markleeds at verizon.net
Sun May 25 04:26:55 CEST 2008


  Thanks Duncan. The person didn't mention the exponential in their 
private email to me so I was pretty confused. Now, I'm unconfused.



On Sat, May 24, 2008 at 10:02 PM, Duncan Murdoch wrote:

> ampad1cb at cmich.edu wrote:
>> The context is "goodness-of-fit techniques"
>>
>> Suppose I want to know whether a sample of data comes from say an 
>> exponential distribution or not.
>>
>> I have a test statistic T, but I do not know its cummulative 
>> distribution.
>>
>> Suppose an observed value of T is t
>>
>> How do I find the p-value in this case by simulation?
>>
>> that is how do I find P(T>t)
>>
>
> Simulate 1000 (or 100000) values of T for which the null is true, and 
> see where t falls in that distribution.
>
> Duncan Murdoch
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide 
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list