David Bickel wrote:
> Is there any automatic mechanism for extracting a likelihood or test
> statistic distribution (PDF or CDF) from an object of class "htest" or
> from another object of a general class encoding a hypothesis test
> result?
>
> I would like to have a function that takes "x", an object of class
> "htest", as its only argument and that returns the likelihood or test
> statistic distribution that was used to compute the p-value. It seems
> the only way to write such a function is to manually assign each test
> its statistic's distribution, e.g., like this:
>
> FUN <- if(names(x$statistic) == "t")
>   dt
> else if(names(x$statistic) == "X-squared")
>   dchisq
> # etc.
>
>   
Just take the p-value itself as the test statistic and use dunif.

I think doing this may also show you that you have a conceptual problem....
(What would you do with the likelihood?)

-- 
   O__  ---- Peter Dalgaard             Ă˜ster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45) 35327918
~~~~~~~~~~ - ([EMAIL PROTECTED])                  FAX: (+45) 35327907

______________________________________________
R-help@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.

Reply via email to