R0DecompKitagawa {Lotka} 
R Documentation 
Decompose differences in R0 into fertility, sex ratio and survival components.
Description
The function uses a 2step Kitagawa decomposition technique to decompose
the difference between two R0 estimates into 3 agespecific
contribution vectors: fertility, sex ratio and survival. This is a
nonsymmetrical decomposition technique specific for the case of R0.
Usage
R0DecompKitagawa(fx1, px1, Lx1, fx2, px2, Lx2)
Arguments
6 vectors of agespecific values, all of equal length:
fx1, fx2 
vector of agespecific allbirth fertility by age of mother.

px1, px2 
vector of proportion female of births by age of mother.

Lx1, Lx2 
vector of lifetable personyears lived between the interval x, x+1 (livings) calculated using a radix of 1. Any Lx
vector can be converted to radix 1 by dividing the entire vector by the
value used for l0 in the survival function column of the lifetable.

Details
All vectors must refer to the same ages. These may include pre and postreproductive ages. In the case of px
and fx
, where nonreproductive ages are used, the vectors must contain no NA
s instead impute zeros in these ages.
Value
A list with 8 components. The list is given the class "R0DecompKitagawa"
in order to define plot
and summary
methods.
Epsilon 
A vector of the agespecific net contributions to differences in R0. 
Fert 
A vector of the agespecific gross fertility contributions to changes in R0. 
SRB 
A vector of the agespecific contributions to changes in R0 due to
differences in the sex ratio at birth (given as the proportion female in
the arguments. 
Surv 
A vector of the agespecific survival contributions to changes in R0. 
R01 
The R0 estimate corresponding with the first set of observations, (population or observation 1). 
R02 
The R0 estimate corresponding with the second set of observations, (population or observation 2). 
R0diff 
The difference in the two R0 estimates, R01R02 . 
Note
This function has not undergone substantial testing, and the formulas used in it have not yet been peer reviewed.
Author(s)
Timothy Riffe
References
Kitagawa, E.M. (1955) Components of a difference between two rates.
Journal of the American Statistical Association. Vol. 50. No. 272. pp.
11681194.
Riffe, Timothy (2011) unpublished paper. Decomposing Net Reproduction (R0). Available at https://sites.google.com/site/timriffepersonal/documents/R0DecompMath.pdf
See Also
See Also plot.R0DecompKitagawa
, summary.R0DecompKitagawa
, plot.R0Decomp
Examples
library(Lotka)
data(LotkaData)
head(LotkaData)
# Fertility
fx2 < LotkaData[,"Bx2"]/LotkaData[,"Nx2"]
fx1 < LotkaData[,"Bx1"]/LotkaData[,"Nx1"]
# Proportion births female
px2 < LotkaData[,"px2"]
px1 < LotkaData[,"px1"]
# Proportion births female
Lx2 < LotkaData[,"Lx2"]
Lx1 < LotkaData[,"Lx1"]
(DecompK < R0DecompKitagawa(fx1,px1,Lx1,fx2,px2,Lx2))
summary(DecompK)
plot(DecompK)
## The function is currently defined as
function(fx1,px1,Lx1,fx2,px2,Lx2){
SurvComponent < FertComponent < AgeComponent < rep(0,length(fx1))
N < length(fx1)
R01 < sum(fx1*px1*Lx1)
R02 < sum(fx2*px2*Lx2)
R0diff < R01R02
AgeComponent < (fx1*Lx1)(fx2*Lx2)
FertComponent < (fx1fx2)*(Lx1+Lx2)*(px1+px2)*.25
SexRatComponent < (fx1+fx2)*(Lx1+Lx2)*(px1px2)*.25
SurvComponent < (Lx1Lx2)*(fx1*px1+fx2*px2)*.5
output < list(Epsilon=AgeComponent,Fert=FertComponent,SRB=SexRatComponent,Surv=SurvComponent,R01=R01,R02=R02,R0diff=R0diff)
class(output) < "R0DecompKitagawa"
return(output)
}
[Package
Lotka version 1.1
Index]