Re: [R] Chi square convolution?

From: Spencer Graves <spencer.graves_at_pdf.com>
Date: Thu 16 Jun 2005 - 05:10:36 EST

          Have you considered the "distr" package?

          Consider the following:

 > library(distr)
 > C1234 <- Chisq(df=1, ncp=2)+Chisq(df=3, ncp=4)
 > # = Chisq(df=1+3, ncp=2+4)
 > q(C1234)(c(.025, .975))

[1] 1.823846 23.435932
 > qchisq(c(.025, .975), 4, 6)
[1] 1.823846 23.435932
 >
 > C12345 <- Chisq(df=1, ncp=2)+3*Chisq(df=4, ncp=5) Warning message:
Grid for approxfun too wide, increase DefaultNrFFTGridPointsExponent in: Chisq(df = 1, ncp = 2) + 3 * Chisq(df = 4, ncp = 5)  > # NOT a standard distribution
 > q(C12345)(c(.025, .975))
[1] 6.562148 68.498397

          spencer graves

Roy Werkman wrote:

> Hi,
>
> I want to determine the confidence interval on the sum of two sigma's.
> Is there an easy way to do this in R? I guess I have to use some sort of
> chisquare convolution algorithm???
>
> Thanx,
> Roy
>
>



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Thu Jun 16 06:19:29 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:32:43 EST