[R] Partial Sums
Peter Dalgaard BSA
p.dalgaard at biostat.ku.dk
Mon Dec 16 13:13:07 CET 2002
Dr Andrew Wilson <eia018 at comp.lancs.ac.uk> writes:
> Is it possible to calculate partial sums in R?
>
> I have the equation:
>
> Px = (k / x) * SUM_{from j >= x to infinity} Pj x=1,2,3,...
>
> where k is a parameter, Pj is the Poisson probability, and x is a rank.
> (This is for rank-frequency data.) In other words, the frequency of an
> entity at rank x depends on the sum of frequencies of all entities at
> ranks j > x.
With some restriction on k and the Poisson intensity lambda, I presume?
How about
k/x * (1-ppois(x-1,lambda))
or am I overlooking something??
--
O__ ---- Peter Dalgaard Blegdamsvej 3
c/ /'_ --- Dept. of Biostatistics 2200 Cph. N
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
More information about the R-help
mailing list