simulated surfaces {posum}R Documentation

Simulated total population/death-rate surface (posum)

Description

Produces and plots the total death rate surface or population surface corresponding to the model specified by pcdr and code{rec}.

Usage

 death.surface(a1,t1,m,con=FALSE)

population.surface(a1,t1,m,con=FALSE)

Arguments

a1 surfaces run from age 0 to age a1.
t1 surfaces run from time 0 to time t1.
m surfaces will be on an m by m grid.
con TRUE for a contour plot, FALSE for a perspective plot.

Details

Given the model specified in functions rec and pcdr, these functions make use of functions population and survival to produce total death rate (i.e. numbers per unit age interval dying per unit time) and population (numbers per unit age interval) surfaces.

Value

A three item list the elements of which are suitable for plotting with persp or contour:

a array of ages.
t array of times.
pop/death matrix of populations or total deaths at all a, code{t} combinations.

WARNING

Author(s)

Simon N. Wood snw@st-and.ac.uk

References

http://www.ruwpa.st-and.ac.uk/simon.html

See Also

pcdr, population, rec, survival,

Examples

op<-par(mfrow=c(2,2))
pop<-population.surface(30,100,30)
death<-death.surface(30,100,30)
# corresponding per capita death rate ....
pcdr<-death
pcdr$death<-pcdr$death/pop$pop
persp(pcdr$a,pcdr$t,pcdr$death,theta=60)
population.surface(30,100,30,con=TRUE)
par(op)

[Package Contents]