Simulating posum data {posum} | R Documentation |
These routines are for numerically integrating the McKendrick equation to obtain
population per unit age interval from the per capita death rates and recruitment rates specified
in rec
and pcdr
. survival(a,t)
finds the proportion surviving from birth to age
a, t, while population(a,t)
finds the populaiton per unit age interval at a, t using rec
and survival
.
survival(a,t) population(a,t)
a |
age survived to or at which population is required. |
t |
time survived to or at which population is required. |
Survival is the negative exponential of the integral of per capiat death rate from recruitment to a, t. The integral is performed numerically using the trapezoidal rule. The population per unit age interval at a,t is just the product of the recruitment rate at t-a and the survival to a, t. Note that these functions do not operate on arrays.
Returns the proportion surviving, or the population per unit age interval.
Simon N. Wood snw@st-and.ac.uk
http://www.ruwpa.st-and.ac.uk/simon.html
death.surface
,
pcdr
,
population.data
,
population.surface
,
rec
,
sim.age.bound
,
m<-30;a1<-30;t1<-100 pop<-matrix(0,m,m) da<-a1/(m-1);dt<-t1/(m-1) t<-a<-0:(m-1);a<-a*da;t<-t*dt for (i in 1:m) for (j in 1:m) pop[i,j]<-population(a[i],t[j]) contour(a,t,pop,xlab="a",ylab="t")