[R] Use of distribution model to estimate probability of an event

Ted Byers r.ted.byers at gmail.com
Fri Sep 19 03:57:03 CEST 2008


I have a situation where there ae two kinds of events: A and B.  B does not
occur without A occuring first, and a percentage of A events lead to an
event B some time later and the remaining ones do not.  I have n independant
samples, with a frequency of events B by week, until event B for a given
week's A events no longer happen (after about 10 weeks, the chance of
another B event is less than 0.1%).  That gives me good enough data to
determine which distribution fits the data.  But looking at the data for
several weeks of A event, it is clear that although the distributions have a
similar shape (e.g. the corresponding B events peak on week two), there are
significant differences between weeks of A events regarding the fraction of
them that lead to B events (sometimes it is 25% and sometimes it is 45%,
with dozens of values in between being observed).

I know how to use R to fit the distributions.

The question is, once I have fit a distribution to the data (i.e. I know the
distribution and it s parameters that give the best fit, is there a function
in R that I can use to obtain the number of events of type B will occur in
week M (knowing the number of A events, and a density function, all I need
is the probability of a B event in the week of interest - a simple forecast
since the week for which we want the answer hasn't come yet - a simple
forecast model), given a number of  A events in a prior week N?  If so, just
tell me the name of the function and the package, and I'll find it and read
up on it.  This is for the development of a model of risk (A events being
desirable and B events representing a cost to all concerned).

It is a simple enough model, but I am having a little trouble finding the
last piece of the puzzle that I need.

Thanks

Ted
-- 
View this message in context: http://www.nabble.com/Use-of-distribution-model-to-estimate-probability-of-an-event-tp19565047p19565047.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list