MyNixOS website logo
Description

Makes a Local Population Projection.

This is a sub national population projection model for calculating population development. The model uses a cohort component method. Further reading: Stanley K. Smith: A Practitioner's Guide to State and Local Population Projections. 2013. <doi:10.1007/978-94-007-7551-0>.

befproj

The goal of befproj is to make forecasts of a population. The method used is a common projection method called cohort component method. In this example data we will make a projection for Umea municipality .

Installation

You can install the released version of befproj from CRAN with:

install.packages("befproj")

Example

This is a simple example how to use the function bef_components and extract results for the population components. The first argument is the start population. The second argument is the assumptions about fertility and death rates etc. The third argument is the year with our start population. The first few rows and columns are shown below:

library(befproj)
bef.1 <- bef_components(startpop_data, assump_data, 2019)
bef.1[2:6,2:5]
#>      netmigration.men netmigration.tot birts.boys births.girls
#> 2020         541.0532         1115.083   784.4031     741.6729
#> 2021         480.7252         1086.154   798.4692     754.9728
#> 2022         515.1171         1089.646   810.5600     766.4050
#> 2023         461.5626         1061.646   819.9212     775.2562
#> 2024         486.9417         1067.007   826.8813     781.8372

This is a simple example how to use the function bef_raw and extract results for the age specific numbers. The first six lines are shown:

bef.2 <- bef_raw(startpop_data, assump_data, 2019)
head(bef.2)
#>   year agegroup2 agegroup total_2 men_2 women_2 age.n
#> 1 2019     [0,1)    [0,1)    1487   784     703     0
#> 2 2019     [1,2)    [1,6)    1515   799     716     1
#> 3 2019     [2,3)    [1,6)    1546   802     744     2
#> 4 2019     [3,4)    [1,6)    1488   775     713     3
#> 5 2019     [4,5)    [1,6)    1484   767     717     4
#> 6 2019     [5,6)    [1,6)    1501   772     729     5

This is a simple example how to use the function bef_proj and extract results for yearly growth:

bef.3 <- bef_proj(startpop_data, assump_data, 2019)
tail(bef.3)
#>        growth
#> 2025 1671.514
#> 2026 1647.338
#> 2027 1630.896
#> 2028 1603.411
#> 2029 1562.460
#> 2030 1490.897
Metadata

Version

0.1.1

License

Unknown

Platforms (77)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows