prop_solver: Proportion Solver

View source: R/prop_solver.R

prop_solverR Documentation

Proportion Solver

Description

Solve the proportion for the missing numeric value in either of the numerators or denominators

Usage

prop_solver(
  n1 = NULL,
  d1 = NULL,
  n2 = NULL,
  d2 = NULL,
  output = c("single", "all")
)

Arguments

n1

numeric vector that contains the numerator 1

d1

numeric vector that contains the denominator 1

n2

numeric vector that contains the numerator 2

d2

numeric vector that contains the denominator 2

output

character vector that contains the output type, (all or single)

Value

the missing proportion value as either a single numeric value or all values as characters

Author(s)

Irucka Embry

Source

  1. Basic Mathematics. "Solving Proportions", https://www.basic-mathematics.com/solving-proportions.html

  2. Dr. Ariyana Love. "SMasks And Covid Tests Contain Nanotech Vaccines Without Informed Consent", April 7, 2021, https://ambassadorlove.blog/2021/04/07/masks-and-covid-tests-contain-nanotech-vaccines-without-informed-consent/

  3. "Electronic Support for Public Health–Vaccine Adverse Event Reporting System (ESP:VAERS) Grant Final Report"/Grant ID: R18 HS 017045 [Inclusive dates: 12/01/07 - 09/30/10]. Principal Investigator: Lazarus, Ross, MBBS, MPH, MMed, GDCompSci., page 6, https://web.archive.org/web/20211230233658/https://www.nvic.org/CMSTemplates/NVIC/Pdf/FDA/ahrq-vaers-report-2011.pdf. Retrieved thanks to the Internet Archive: Wayback Machine

Examples


# Example 1 from the Example # 1 from Reference 1

library(iemisc)

# 5 / x = 10 / 16

prop_solver(n1 = 5, n2 = 10, d2 = 16, output = "single")




# Example 2

library(iemisc)

t1 <- "34 3 1/2"
t2 <- 5
t3 <- 5 / 2

t11 <- construction_decimal(t1, result = "traditional", output = "vector")

prop_solver(n1 = t11, n2 = 5, d1 = 5 / 2, output = "all")




# Example 3

library(iemisc)

# Refer to Reference 2 and Reference 3

# What is the numerator (n1) for the situation where VAERS reports 4,576 dead
# people; however, the number of dead people is closer to 453,024 people?

d1 <- 100 / 100 # 100%
n2 <- 4576 # number of deceased people
d2 <- 453024 # number of deceased people

prop_solver(d1 = d1, n2 = n2, d2 = d2, output = "single")


# What is the more accurate number of dead people (d2) where VAERS reports 4,576
# dead people and we recognize that less than 1% of adverse reactions are reported
# to VAERS?

n1 <- 0.99999999999999999999999999999999999999999999999 / 100 # less than 1%
n11 <- 0.98 / 100 # less than 1%
d1 <- 100 / 100 # number of deceased people
n2 <- 4576 # number of deceased people

prop_solver(n1 = n1, d1 = d1, n2 = n2, output = "all")

prop_solver(n1 = n1, d1 = d1, n2 = n2, output = "single")


prop_solver(n1 = n11, d1 = d1, n2 = n2, output = "all")

prop_solver(n1 = n11, d1 = d1, n2 = n2, output = "single")









iemisc documentation built on Sept. 25, 2023, 5:09 p.m.