inst/doc/basic_contrasts.R

## ----include = FALSE----------------------------------------------------------
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
options(digits = 3)


## ----setup--------------------------------------------------------------------
library(ratesci)

## -----------------------------------------------------------------------------
out <- scoreci(x1 = 5, n1 = 56, x2 = 0, n = 29)
out$estimates

## -----------------------------------------------------------------------------
scoreci(x1 = 5, n1 = 56, x2 = 0, n = 29, skew = FALSE)$estimates
scoreci(x1 = 5, n1 = 56, x2 = 0, n = 29, skew = FALSE, bcf = FALSE)$estimates

## -----------------------------------------------------------------------------
out$pval

## -----------------------------------------------------------------------------
scasci(x1 = 5, n1 = 56, x2 = 0, n = 29)$estimates

## -----------------------------------------------------------------------------
scasci(x1 = 5, n1 = 56, x2 = 0, n = 29, contrast = "RR")$estimates

## -----------------------------------------------------------------------------
scasci(x1 = 5, n1 = 56, x2 = 0, n = 29, contrast = "OR")$estimates

## -----------------------------------------------------------------------------
scasci(x1 = 5, n1 = 56, x2 = 0, n = 29, contrast = "RR", distrib = "poi")$estimates

## -----------------------------------------------------------------------------
moverci(x1 = 5, n1 = 56, x2 = 0, n = 29)

## -----------------------------------------------------------------------------
moverci(x1 = 5, n1 = 56, x2 = 0, n = 29, type = "wilson")

## -----------------------------------------------------------------------------
moverbci(x1 = 5, n1 = 56, x2 = 0, n = 29, a1 = 1.5, b1 = 9.5, a2 = 0.5, b2 = 10.5)

Try the ratesci package in your browser

Any scripts or data that you put into this service are public.

ratesci documentation built on June 21, 2025, 1:07 a.m.