README.md

Build Status AppVeyor Build Status CRAN status issues license

DemoDecomp

General demographic decomposition methods

Install from CRAN in the standard way:

install.packages("DemoDecomp")

Or install the github development version (maybe it has new toys!):

# install.packages("devtools")

library(devtools)
install_github("timriffe/DemoDecomp")

Then you can run the examples like so:

library(DemoDecomp)
data(rates1)
data(rates2)
# we need rates1 and rates2 as vectors
rates1 <- c(rates1)
rates2 <- c(rates2)

?horiuchi
A <- horiuchi(func = R0vec,
               pars1 = rates1,
               pars2 = rates2,
               N = 10,
               pfem = .4886) 

?stepwise_replacement      
B <- stepwise_replacement(func = R0vec,
               pars1 = rates1,
               pars2 = rates2,
               pfem = .4886,
               symmetrical = TRUE,
               direction = "up")                

This package supersedes DecompHoriuchi



timriffe/DemoDecomp documentation built on Aug. 17, 2018, 3:25 a.m.