summary method for the output from

x 
output from R0Decomp() .

Value
summary table printed to the console. There is no other output.
Note
A future modification might make optional LaTeX output for the table using xtable
. This is not yet implemented here.
Author(s)
Timothy Riffe
See Also
See Also plot.R0Decomp
, R0Decomp
Examples
library(Lotka)
data(LotkaData)
head(LotkaData)
# Deaths
Dx2 < LotkaData[,"Dx2"]
Dx1 < LotkaData[,"Dx1"]
# Exposures
Nx2 < LotkaData[,"Nx2"]
Nx1 < LotkaData[,"Nx1"]
# Births
Bx2 < LotkaData[,"Bx2"]
Bx1 < LotkaData[,"Bx1"]
# Proportion births female
px2 < LotkaData[,"px2"]
px1 < LotkaData[,"px1"]
Decomp1 < R0Decomp(Dx1,Nx1,Bx1,px1,Dx2,Nx2,Bx2,px2)
summary(Decomp1)
## The function is currently defined as
function(x){
R01 < round(x$R01,4)
R02 < round(x$R02,4)
R0diff < round(x$R0diff,4)
Epsilon < round(R01R02,4)
Mortality < round(sum(x$Mort),4)
Fertility < round(sum(x$Fert),4)
SexRatio < round(sum(x$SRB),4)
results < matrix(nrow=3,ncol=2)
results[1,] < c(Fertility,round((Fertility/R0diff)*100,2))
results[2,] < c(SexRatio,round((SexRatio/R0diff)*100,2))
results[3,] < c(Mortality,round((Mortality/R0diff)*100,2))
colnames(results) < c("absolute","percent")
rownames(results) < c("Fertility","SexRatio","Mortality")
line1 < "\nDecomposition of R0 Difference"
line2 < paste("\nR01 =",R01," ; R02 =",R02,"")
line3 < paste("\nThe difference, Epsilon, =",Epsilon,"\n\n")
cat("\n##############################################################")
cat(line1,line2,line3)
print(results)
cat("\n##############################################################")
}
[Package Lotka version 1.1 Index]