Learn R Programming

R package SocEpi

The R package SocEpi is developed for health inequalities research. This is the first version of the package and it includes a small number of useful functions such as:

  • z_score to calculate z-scores (for deprivation measures).
  • w_pcntile to calculate percentiles, such as quintiles or deciles from deprivation measures.
  • st_rate for calculating direct standardized rates with confidence intervals.
  • rii for calculating RII/SII and confidence intervals.
  • smr for calculating standardized mortality ratios and confidence intervals.

Installation

To install the package in R type:

install.packages("SocEpi")
library(SocEpi)

or from Github

install.packages(devtools) # if not installed before
devtools::install_github("m-allik/SocEpi")

How to use

Please take a look at the vignette or help files for examples of how to use the package.

Feedback

Please use the GitHub repository's Issues section if you have any comments, suggestions or if you notice any problems with the functions.

Copy Link

Version

Install

install.packages('SocEpi')

Monthly Downloads

7

Version

1.0.0

License

MIT + file LICENSE

Maintainer

Mirjam Allik

Last Published

May 26th, 2020

Functions in SocEpi (1.0.0)

subset_q

Subset data
zscore

z-scores
w_pcntile

Function to create population weighted deprivation percentiles
st_rate

Standardized mortality rates and confidence intervals
age_grouping

Age grouping function
CI_multinom

Multinomial simulation for CIs
rii

RII/SII and confidence intervals
st_pop

Standard population data
smr

Standardized mortality ratios and confidence intervals
health_data

Scottish health and deprivation data
beta

Slope of an OLS regression
popmid

Population midpoints
dep_data

Scottish deprivation data