knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

researchfunctions

The goal of researchfunctions is to allow me to keep all my functions for my project in one place.

Installation

You can install the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("dakthomps00/researchfunctions")

Example

This is a basic example which shows you how to solve a common problem:

Say we want to get confidence intervals of effect sizes for random normally distributed data sets we would do this

library(researchfunctions)

cohen <- replicate(10000, cohensd_OG(75,0,1,1))
mad <- replicate(10000, deltamad_OG(75,0,1,1))

confidint(cohen, 75)
confidint(mad,75)

This is another basic example which shows you how to solve a common problem:

Say we want to get confidence intervals of effect sizes for random normally distributed data sets that are contaminated with another normally distributed data set, we would do this

library(researchfunctions)

cohen <- replicate(10000, cohensd_A(75,0.8,0.2,0,1,1.5,1,1,0.5))
mad <- replicate(10000, deltamad_A(75,0.8,0.2,0,1,1.5,1,1,0.5))

cohen1 <- t(cohen)
mad1 <- t(mad)

confidint(cohen1[,1], 75)
confidint(mad1[,1],75)

This is another basic example which shows you how to solve a common problem:

Say we want to get confidence intervals of effect sizes for random normally distributed data sets that are contaminated with a uniform data set, we would do this

library(researchfunctions)

cohen <- replicate(10000, cohensd_B(75,0.8,0.2,0,1,1.5,1,1,2))
mad <- replicate(10000, deltamad_B(75,0.8,0.2,0,1,1.5,1,1,2))

cohen1 <- t(cohen)
mad1 <- t(mad)

confidint(cohen1[,1], 75)
confidint(mad1[,1],75)

This is another basic example which shows you how to solve a common problem:

Say we want to find effect sizes for 2 Poisson distributions

before <- rpois(75,2)
after <- rpois(75,3)

cohensdcalc(before,after)
deltamadcalc(75,before,after)


dakthomps00/researchfunctions documentation built on March 19, 2022, 10:50 a.m.