k
.dgs( x, k, S, log = FALSE )
pgs( q, k, S, lower.tail = TRUE, log.p = FALSE )
qgs( p, k, S, lower.tail = TRUE, log.p = FALSE )
dgs
gives the (log) density and pgs
gives the (log)
distribution function of ranks, and qgs
gives the
corresponding quantile function.[dpq]gs
can be used as rank-abundance model
for species ranks in a sample or biological community
see fitrad-class
.fitgs
, fitrad
to fit the Geometric series as a
rank-abundance model.x <- 1:25
PDF <- dgs(x=x, k=0.1, S=25)
CDF <- pgs(q=x, k=0.1, S=25)
par(mfrow=c(1,2))
plot(x,CDF, ylab="Cumulative Probability", type="b",
main="Geometric series distribution, CDF")
plot(x,PDF, ylab="Probability, log-scale", type="h",
main="Geometric series distribution, PDF", log="y")
par(mfrow=c(1,1))
## quantile is the inverse of CDF
all.equal(qgs(CDF, k=0.1, S=25), x)
Run the code above in your browser using DataLab