Skip to content

General demographic decomposition methods

Notifications You must be signed in to change notification settings

vicmgg/DemoDecomp

 
 

Repository files navigation

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

About

General demographic decomposition methods

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • R 95.3%
  • TeX 4.7%