simulated surfaces {posum} | R Documentation |
Produces and plots the total death rate surface or population
surface corresponding to the model specified by pcdr
and
code{rec}.
death.surface(a1,t1,m,con=FALSE) population.surface(a1,t1,m,con=FALSE)
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. |
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.
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. |
Simon N. Wood snw@st-and.ac.uk
http://www.ruwpa.st-and.ac.uk/simon.html
pcdr
,
population
,
rec
,
survival
,
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)