Hi there ๐
My ๐ is at epijim.uk
I run a cron job that makes commits - so my streak is not human in nature... (I should probably make a bot account)
R functions based on episheet and the text book Modern Epidemiology, Second Edition, by Kenneth J. Rothman and Sander Greenland.
Home Page: http://krothman.org
My ๐ is at epijim.uk
I run a cron job that makes commits - so my streak is not human in nature... (I should probably make a bot account)
Ken Rothman's episheet has a tab for calculating standardised rates and proportions. This package has no such functions.
Add one or more functions to calculate standardised rates and proportions.
See Ch. 15 from p265 of 2nd Ed Modern Epidemiology.
It should fit with tidyverse so that can do grouped calculations.
Table 15-2, p268 has sample data (which I think already exists in package?), same as on standardisation tab in Excel episheet.
dat <- data.frame(
exposure_var = c(rep(1, 8), rep(0, 5), rep(1, 98), rep(0, 115)),
outcome_var = c(rep(1, 8), rep(1, 5), rep(0, 98), rep(0, 115)),
stringsAsFactors = FALSE
)
> risk(data = dat, exposure = exposure_var, outcome = outcome_var)
## # A tibble: 2 x 10
## exposure_var n outcome risk risk_ratio rr_lci rr_uci risk_diff rd_lci rd_uci
## <dbl> <int> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0 120 5 4.17 1 0.337 2.96 0 -6.20 6.20
## 2 1 106 8 7.55 1.81 0.611 5.37 3.38 -2.82 9.58
> risk(data = dat, exposure = exposure_var, outcome = outcome_var,ci_level = 99)
## # A tibble: 2 x 10
## exposure_var n outcome risk risk_ratio rr_lci rr_uci risk_diff rd_lci rd_uci
## <dbl> <int> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0 120 5 4.17 1 0.337 2.96 0 -6.20 6.20
## 2 1 106 8 7.55 1.81 0.611 5.37 3.38 -2.82 9.58
I believe the line that reads z <- abs(qnorm(((100 - 95)/2)/100))
in the function should be z <- abs(qnorm(((100 - ci_level)/2)/100))
. Editing the function as such produces different confidence limits when ci_level is set.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.