[R] likelihood from test result
Matthias Kohl
Matthias.Kohl at stamats.de
Thu Jan 10 11:04:50 CET 2008
Dear David,
no, distrTEst won't help. It has a different intention.
We are currently working on a new package "distrMod"
(cf. https://r-forge.r-project.org/projects/distrmod/)
which sometime might have such a functionality.
Best,
Matthias
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.
>
> Is there a general S3 or S4 class other than "htest" that would better
> accommodate such extraction of distributions or likelihoods? I would
> also appreciate any suggestions for strategies or contributed packages
> that may facilitate automation. For example, would the "distrTEst"
> package help?
>
> David
>
> ______________________________
> David R. Bickel
> Ottawa Institute of Systems Biology
> http://www.oisb.ca/members.htm
>
> ______________________________________________
> 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