Re: [R] Sum of random values

From: Matthias Kohl <Matthias.Kohl_at_stamats.de>
Date: Sun, 27 Apr 2008 17:22:42 +0200

Hello Ricardo,

no, the distribution needs not to be predefined. You can define your own distribution. For more details you may want to have a look at the vignette which is provided by package "distrDoc".

Do the random variables follow a discrete or an absolutely continuous distribution?
To see how convolution is performed in package "distr" have a look at

library(distr)
getMethod("+", c("DiscreteDistribution", "DiscreteDistribution")) ## respectively
getMethod("+", c("AbscontDistribution", "AbscontDistribution"))

hth,
Matthias

Ricardo Bessa wrote:
> Thank you Gregory,
> I know the package distR but the the percentiles that I have are from an unkonwn distribuition, and I think that the package distR only works with pre-defined distribuions.
>
> Best Regards,
> Ricardo Bessa> Subject: RE: [R] Sum of random values> Date: Fri, 25 Apr 2008 09:16:10 -0600> From: Greg.Snow_at_imail.org> To: bessa_ricardo_at_hotmail.com; r-help_at_r-project.org> > You might want to look at the distr package (and its relatives). It> provides methods for calculating the distribution function of> combinations (the sum is one) of other distributions. I'm not sure how> you would convert your percentiles to a distribution function, but there> may be a way in the documentation for distr and friends.> > -- > Gregory (Greg) L. Snow Ph.D.> Statistical Data Center> Intermountain Healthcare> greg.snow_at_imail.org> (801) 408-8111> > > > > -----Original Message-----> > From: r-help-bounces_at_r-project.org > > [mailto:r-help-bounces_at_r-project.org] On Behalf Of Ricardo Bessa> > Sent: Thursday, April 24, 2008 5:12 PM> > To: r-help_at_r-project.org> > Subject: [R] Sum of random values> > > > > > Hello,> > I have two random variables with their percentiles which > > correspond to their !
 pr!
> obability distribution function. My > > objective is to sum these two random variables. There exists > > any algorithm or procedure in R capable of converting the > > percentiles to a probability density function? is the fast > > Fourier transform function of R(fft) capable of doing the sum > > with a convolution?> > > > I'm just starting with this specific problem, so any help it > > will be very useful.> > > > Best regards,> > Ricardo Bessa> > > > _________________________________________________________________> > > > [[elided Hotmail spam]]> > > > [[alternative HTML version deleted]]> > > > ______________________________________________> > 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.> > >
> _________________________________________________________________
>
> [[elided Hotmail spam]]
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> 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.
>

-- 
Dr. Matthias Kohl
www.stamats.de

______________________________________________
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.
Received on Sun 27 Apr 2008 - 16:15:59 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sun 27 Apr 2008 - 17:30:32 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive