From 4ff0fe79f9c4211b6c0375b079c4dfe33000ec3a Mon Sep 17 00:00:00 2001
From: rsquaredin
Date: Fri, 9 Jul 2021 17:32:27 +0530
Subject: [PATCH 01/10] refactor: change prefix to ifr_*
---
NAMESPACE | 98 +++---
R/ifr-anova.R | 16 +-
R/ifr-binom-test.R | 24 +-
R/ifr-chisq-assoc-test.R | 20 +-
R/ifr-chisq-gof-test.R | 26 +-
R/ifr-cochran-q-test.R | 16 +-
R/ifr-launch-shiny-app.R | 6 +-
R/ifr-levene-test.R | 22 +-
R/ifr-mcnemar-test.R | 20 +-
R/ifr-os-prop-test.R | 24 +-
R/ifr-os-t-test.R | 26 +-
R/ifr-os-var-test.R | 26 +-
R/ifr-runs-test.R | 26 +-
R/ifr-ts-ind-ttest.R | 26 +-
R/ifr-ts-paired-ttest.R | 26 +-
R/ifr-ts-prop-test.R | 44 +--
R/ifr-ts-var-test.R | 22 +-
README.Rmd | 12 +-
README.md | 12 +-
_pkgdown.yml | 36 ++-
docs/404.html | 6 +
docs/CONDUCT.html | 6 +
docs/LICENSE-text.html | 6 +
docs/articles/index.html | 6 +
docs/articles/intro.html | 70 +++--
docs/authors.html | 6 +
docs/index.html | 25 +-
docs/news/index.html | 8 +-
docs/pkgdown.yml | 2 +-
docs/reference/exam.html | 6 +
docs/reference/hsb.html | 6 +
docs/reference/ifr_binom_calc.html | 86 +++---
docs/reference/ifr_chisq_assoc_test.html | 60 ++--
docs/reference/ifr_chisq_gof_test.html | 80 ++---
docs/reference/ifr_cochran_qtest.html | 25 +-
docs/reference/ifr_launch_shiny_app.html | 16 +-
docs/reference/ifr_levene_test.html | 94 +++---
docs/reference/ifr_mcnemar_test.html | 231 +++++++-------
docs/reference/ifr_oneway_anova.html | 100 +++---
docs/reference/ifr_os_prop_test.html | 74 +++--
docs/reference/ifr_os_t_test.html | 155 +++++-----
docs/reference/ifr_os_var_test.html | 160 +++++-----
docs/reference/ifr_runs_test.html | 125 ++++----
docs/reference/ifr_ts_ind_ttest.html | 286 +++++++++---------
docs/reference/ifr_ts_paired_ttest.html | 226 +++++++-------
docs/reference/ifr_ts_prop_test.html | 89 +++---
docs/reference/ifr_ts_var_test.html | 108 ++++---
docs/reference/index.html | 36 ++-
docs/reference/inferr.html | 6 +
docs/reference/treatment.html | 6 +
docs/reference/treatment2.html | 6 +
docs/sitemap.xml | 34 +--
...{infer_binom_calc.Rd => ifr_binom_calc.Rd} | 20 +-
..._assoc_test.Rd => ifr_chisq_assoc_test.Rd} | 18 +-
...hisq_gof_test.Rd => ifr_chisq_gof_test.Rd} | 16 +-
..._cochran_qtest.Rd => ifr_cochran_qtest.Rd} | 14 +-
...h_shiny_app.Rd => ifr_launch_shiny_app.Rd} | 8 +-
...nfer_levene_test.Rd => ifr_levene_test.Rd} | 22 +-
...er_mcnemar_test.Rd => ifr_mcnemar_test.Rd} | 18 +-
...er_oneway_anova.Rd => ifr_oneway_anova.Rd} | 14 +-
...er_os_prop_test.Rd => ifr_os_prop_test.Rd} | 22 +-
man/{infer_os_t_test.Rd => ifr_os_t_test.Rd} | 22 +-
...nfer_os_var_test.Rd => ifr_os_var_test.Rd} | 22 +-
man/{infer_runs_test.Rd => ifr_runs_test.Rd} | 22 +-
...er_ts_ind_ttest.Rd => ifr_ts_ind_ttest.Rd} | 22 +-
...paired_ttest.Rd => ifr_ts_paired_ttest.Rd} | 22 +-
...er_ts_prop_test.Rd => ifr_ts_prop_test.Rd} | 30 +-
...nfer_ts_var_test.Rd => ifr_ts_var_test.Rd} | 18 +-
tests/testthat/test-anova.R | 6 +-
tests/testthat/test-binom.R | 40 +--
tests/testthat/test-chisq.R | 22 +-
tests/testthat/test-chisqgof.R | 24 +-
tests/testthat/test-cochran.R | 12 +-
tests/testthat/test-indttest.R | 14 +-
tests/testthat/test-levene.R | 10 +-
tests/testthat/test-mcnemar.R | 10 +-
tests/testthat/test-os-vartest.R | 20 +-
tests/testthat/test-paired-test.R | 12 +-
tests/testthat/test-prop-test.R | 20 +-
tests/testthat/test-runs.R | 12 +-
tests/testthat/test-ttest.R | 26 +-
tests/testthat/test-two-prop-test.R | 56 ++--
tests/testthat/test-two-var-test.R | 14 +-
tests/testthat/test-utils.R | 2 +-
vignettes/intro.Rmd | 62 ++--
85 files changed, 1793 insertions(+), 1557 deletions(-)
rename man/{infer_binom_calc.Rd => ifr_binom_calc.Rd} (72%)
rename man/{infer_chisq_assoc_test.Rd => ifr_chisq_assoc_test.Rd} (78%)
rename man/{infer_chisq_gof_test.Rd => ifr_chisq_gof_test.Rd} (77%)
rename man/{infer_cochran_qtest.Rd => ifr_cochran_qtest.Rd} (71%)
rename man/{infer_launch_shiny_app.Rd => ifr_launch_shiny_app.Rd} (63%)
rename man/{infer_levene_test.Rd => ifr_levene_test.Rd} (77%)
rename man/{infer_mcnemar_test.Rd => ifr_mcnemar_test.Rd} (78%)
rename man/{infer_oneway_anova.Rd => ifr_oneway_anova.Rd} (78%)
rename man/{infer_os_prop_test.Rd => ifr_os_prop_test.Rd} (73%)
rename man/{infer_os_t_test.Rd => ifr_os_t_test.Rd} (74%)
rename man/{infer_os_var_test.Rd => ifr_os_var_test.Rd} (74%)
rename man/{infer_runs_test.Rd => ifr_runs_test.Rd} (80%)
rename man/{infer_ts_ind_ttest.Rd => ifr_ts_ind_ttest.Rd} (81%)
rename man/{infer_ts_paired_ttest.Rd => ifr_ts_paired_ttest.Rd} (75%)
rename man/{infer_ts_prop_test.Rd => ifr_ts_prop_test.Rd} (72%)
rename man/{infer_ts_var_test.Rd => ifr_ts_var_test.Rd} (77%)
diff --git a/NAMESPACE b/NAMESPACE
index d39961e..e7643c1 100644
--- a/NAMESPACE
+++ b/NAMESPACE
@@ -1,54 +1,54 @@
# Generated by roxygen2: do not edit by hand
-S3method(infer_binom_calc,default)
-S3method(infer_chisq_assoc_test,default)
-S3method(infer_chisq_gof_test,default)
-S3method(infer_cochran_qtest,default)
-S3method(infer_levene_test,default)
-S3method(infer_mcnemar_test,default)
-S3method(infer_oneway_anova,default)
-S3method(infer_os_prop_test,default)
-S3method(infer_os_t_test,default)
-S3method(infer_os_var_test,default)
-S3method(infer_runs_test,default)
-S3method(infer_ts_ind_ttest,default)
-S3method(infer_ts_paired_ttest,default)
-S3method(infer_ts_prop_test,default)
-S3method(infer_ts_var_test,default)
-S3method(print,infer_binom_calc)
-S3method(print,infer_chisq_assoc_test)
-S3method(print,infer_chisq_gof_test)
-S3method(print,infer_cochran_qtest)
-S3method(print,infer_levene_test)
-S3method(print,infer_mcnemar_test)
-S3method(print,infer_oneway_anova)
-S3method(print,infer_os_prop_test)
-S3method(print,infer_os_t_test)
-S3method(print,infer_os_var_test)
-S3method(print,infer_runs_test)
-S3method(print,infer_ts_ind_ttest)
-S3method(print,infer_ts_paired_ttest)
-S3method(print,infer_ts_prop_test)
-S3method(print,infer_ts_var_test)
-export(infer_binom_calc)
-export(infer_binom_test)
-export(infer_chisq_assoc_test)
-export(infer_chisq_gof_test)
-export(infer_cochran_qtest)
-export(infer_launch_shiny_app)
-export(infer_levene_test)
-export(infer_mcnemar_test)
-export(infer_oneway_anova)
-export(infer_os_prop_test)
-export(infer_os_t_test)
-export(infer_os_var_test)
-export(infer_runs_test)
-export(infer_ts_ind_ttest)
-export(infer_ts_paired_ttest)
-export(infer_ts_prop_calc)
-export(infer_ts_prop_group)
-export(infer_ts_prop_test)
-export(infer_ts_var_test)
+S3method(ifr_binom_calc,default)
+S3method(ifr_chisq_assoc_test,default)
+S3method(ifr_chisq_gof_test,default)
+S3method(ifr_cochran_qtest,default)
+S3method(ifr_levene_test,default)
+S3method(ifr_mcnemar_test,default)
+S3method(ifr_oneway_anova,default)
+S3method(ifr_os_prop_test,default)
+S3method(ifr_os_t_test,default)
+S3method(ifr_os_var_test,default)
+S3method(ifr_runs_test,default)
+S3method(ifr_ts_ind_ttest,default)
+S3method(ifr_ts_paired_ttest,default)
+S3method(ifr_ts_prop_test,default)
+S3method(ifr_ts_var_test,default)
+S3method(print,ifr_binom_calc)
+S3method(print,ifr_chisq_assoc_test)
+S3method(print,ifr_chisq_gof_test)
+S3method(print,ifr_cochran_qtest)
+S3method(print,ifr_levene_test)
+S3method(print,ifr_mcnemar_test)
+S3method(print,ifr_oneway_anova)
+S3method(print,ifr_os_prop_test)
+S3method(print,ifr_os_t_test)
+S3method(print,ifr_os_var_test)
+S3method(print,ifr_runs_test)
+S3method(print,ifr_ts_ind_ttest)
+S3method(print,ifr_ts_paired_ttest)
+S3method(print,ifr_ts_prop_test)
+S3method(print,ifr_ts_var_test)
+export(ifr_binom_calc)
+export(ifr_binom_test)
+export(ifr_chisq_assoc_test)
+export(ifr_chisq_gof_test)
+export(ifr_cochran_qtest)
+export(ifr_launch_shiny_app)
+export(ifr_levene_test)
+export(ifr_mcnemar_test)
+export(ifr_oneway_anova)
+export(ifr_os_prop_test)
+export(ifr_os_t_test)
+export(ifr_os_var_test)
+export(ifr_runs_test)
+export(ifr_ts_ind_ttest)
+export(ifr_ts_paired_ttest)
+export(ifr_ts_prop_calc)
+export(ifr_ts_prop_group)
+export(ifr_ts_prop_test)
+export(ifr_ts_var_test)
import(magrittr)
importFrom(Rcpp,sourceCpp)
importFrom(data.table,":=")
diff --git a/R/ifr-anova.R b/R/ifr-anova.R
index eac0b26..2639fc2 100644
--- a/R/ifr-anova.R
+++ b/R/ifr-anova.R
@@ -4,8 +4,8 @@
#' @param x numeric; column in \code{data}
#' @param y factor; column in \code{data}
#' @param ... additional arguments passed to or from other methods
-#' @return \code{infer_oneway_anova} returns an object of class \code{"infer_oneway_anova"}.
-#' An object of class \code{"infer_oneway_anova"} is a list containing the
+#' @return \code{ifr_oneway_anova} returns an object of class \code{"ifr_oneway_anova"}.
+#' An object of class \code{"ifr_oneway_anova"} is a list containing the
#' following components:
#'
#' \item{adjusted_r2}{adjusted r squared value}
@@ -29,14 +29,14 @@
#'
#' @seealso \code{\link[stats]{anova}}
#' @examples
-#' infer_oneway_anova(mtcars, mpg, cyl)
-#' infer_oneway_anova(hsb, write, prog)
+#' ifr_oneway_anova(mtcars, mpg, cyl)
+#' ifr_oneway_anova(hsb, write, prog)
#' @export
#'
-infer_oneway_anova <- function(data, x, y, ...) UseMethod("infer_oneway_anova")
+ifr_oneway_anova <- function(data, x, y, ...) UseMethod("ifr_oneway_anova")
#' @export
-infer_oneway_anova.default <- function(data, x, y, ...) {
+ifr_oneway_anova.default <- function(data, x, y, ...) {
x1 <- deparse(substitute(x))
y1 <- deparse(substitute(y))
@@ -64,12 +64,12 @@ infer_oneway_anova.default <- function(data, x, y, ...) {
ss_total = k$total,
ss_within = k$ssee)
- class(result) <- "infer_oneway_anova"
+ class(result) <- "ifr_oneway_anova"
return(result)
}
#' @export
-print.infer_oneway_anova <- function(x, ...) {
+print.ifr_oneway_anova <- function(x, ...) {
print_owanova(x)
}
diff --git a/R/ifr-binom-test.R b/R/ifr-binom-test.R
index 5dc3d7f..28397bd 100644
--- a/R/ifr-binom-test.R
+++ b/R/ifr-binom-test.R
@@ -8,8 +8,8 @@
#' @param variable factor; column in \code{data}
#' @param ... additional arguments passed to or from other methods
#'
-#' @return \code{infer_binom_test} returns an object of class \code{"infer_binom_test"}.
-#' An object of class \code{"infer_binom_test"} is a list containing the
+#' @return \code{ifr_binom_test} returns an object of class \code{"ifr_binom_test"}.
+#' An object of class \code{"ifr_binom_test"} is a list containing the
#' following components:
#'
#' \item{exp_k}{expected number of successes}
@@ -21,23 +21,23 @@
#' \item{pval_upper}{upper one sided p value}
#' @section Deprecated Functions:
#' \code{binom_calc()} and \code{binom_test()} have been deprecated. Instead use
-#' \code{infer_binom_cal()} and \code{infer_binom_test()}.
+#' \code{ifr_binom_cal()} and \code{ifr_binom_test()}.
#' @references Hoel, P. G. 1984. Introduction to Mathematical Statistics.
#' 5th ed. New York: Wiley.
#'
#' @seealso \code{\link[stats]{binom.test}}
#' @examples
#' # using calculator
-#' infer_binom_calc(32, 13, prob = 0.5)
+#' ifr_binom_calc(32, 13, prob = 0.5)
#'
#' # using data set
-#' infer_binom_test(hsb, female, prob = 0.5)
+#' ifr_binom_test(hsb, female, prob = 0.5)
#' @export
#'
-infer_binom_calc <- function(n, success, prob = 0.5, ...) UseMethod("infer_binom_calc")
+ifr_binom_calc <- function(n, success, prob = 0.5, ...) UseMethod("ifr_binom_calc")
#' @export
-infer_binom_calc.default <- function(n, success, prob = 0.5, ...) {
+ifr_binom_calc.default <- function(n, success, prob = 0.5, ...) {
if (!is.numeric(n)) {
stop("n must be an integer", call. = FALSE)
@@ -68,18 +68,18 @@ infer_binom_calc.default <- function(n, success, prob = 0.5, ...) {
pval_upper = k$upper
)
- class(out) <- "infer_binom_calc"
+ class(out) <- "ifr_binom_calc"
return(out)
}
#' @export
-print.infer_binom_calc <- function(x, ...) {
+print.ifr_binom_calc <- function(x, ...) {
print_binom(x)
}
#' @export
-#' @rdname infer_binom_calc
-infer_binom_test <- function(data, variable, prob = 0.5) {
+#' @rdname ifr_binom_calc
+ifr_binom_test <- function(data, variable, prob = 0.5) {
varyable <- deparse(substitute(variable))
fdata <- data[[varyable]]
@@ -102,7 +102,7 @@ infer_binom_test <- function(data, variable, prob = 0.5) {
n <- length(fdata)
k <- table(fdata)[[2]]
- infer_binom_calc.default(n, k, prob)
+ ifr_binom_calc.default(n, k, prob)
}
#' @importFrom stats pbinom dbinom
diff --git a/R/ifr-chisq-assoc-test.R b/R/ifr-chisq-assoc-test.R
index 4591e58..681cb3a 100644
--- a/R/ifr-chisq-assoc-test.R
+++ b/R/ifr-chisq-assoc-test.R
@@ -4,9 +4,9 @@
#' @param data a \code{data.frame} or \code{tibble}
#' @param x factor; column in \code{data}
#' @param y factor; column in \code{data}
-#' @return \code{infer_chisq_assoc_test} returns an object of class
-#' \code{"infer_chisq_assoc_test"}. An object of class
-#' \code{"infer_chisq_assoc_test"} is a list containing the
+#' @return \code{ifr_chisq_assoc_test} returns an object of class
+#' \code{"ifr_chisq_assoc_test"}. An object of class
+#' \code{"ifr_chisq_assoc_test"} is a list containing the
#' following components:
#'
#' \item{chisquare}{chi square}
@@ -25,21 +25,21 @@
#'
#' @section Deprecated Function:
#' \code{chisq_test()} has been deprecated. Instead use
-#' \code{infer_chisq_assoc_test()}.
+#' \code{ifr_chisq_assoc_test()}.
#'
#' @seealso \code{\link[stats]{chisq.test}}
#' @references Sheskin, D. J. 2007. Handbook of Parametric and Nonparametric
#' Statistical Procedures, 4th edition. : Chapman & Hall/CRC.
#' @examples
-#' infer_chisq_assoc_test(hsb, female, schtyp)
+#' ifr_chisq_assoc_test(hsb, female, schtyp)
#'
-#' infer_chisq_assoc_test(hsb, female, ses)
+#' ifr_chisq_assoc_test(hsb, female, ses)
#' @export
#'
-infer_chisq_assoc_test <- function(data, x, y) UseMethod("infer_chisq_assoc_test")
+ifr_chisq_assoc_test <- function(data, x, y) UseMethod("ifr_chisq_assoc_test")
#' @export
-infer_chisq_assoc_test.default <- function(data, x, y) {
+ifr_chisq_assoc_test.default <- function(data, x, y) {
x1 <- deparse(substitute(x))
y1 <- deparse(substitute(y))
@@ -111,12 +111,12 @@ infer_chisq_assoc_test.default <- function(data, x, y) {
)
}
- class(result) <- "infer_chisq_assoc_test"
+ class(result) <- "ifr_chisq_assoc_test"
return(result)
}
#' @export
-print.infer_chisq_assoc_test <- function(x, ...) {
+print.ifr_chisq_assoc_test <- function(x, ...) {
print_chisq_test(x)
}
diff --git a/R/ifr-chisq-gof-test.R b/R/ifr-chisq-gof-test.R
index 8e9d643..9caf6cd 100644
--- a/R/ifr-chisq-gof-test.R
+++ b/R/ifr-chisq-gof-test.R
@@ -5,8 +5,8 @@
#' @param x factor; column in \code{data}
#' @param y expected proportions
#' @param correct logical; if TRUE continuity correction is applied
-#' @return \code{infer_chisq_gof_test} returns an object of class
-#' \code{"infer_chisq_gof_test"}. An object of class \code{"infer_chisq_gof_test"}
+#' @return \code{ifr_chisq_gof_test} returns an object of class
+#' \code{"ifr_chisq_gof_test"}. An object of class \code{"ifr_chisq_gof_test"}
#' is a list containing the following components:
#'
#' \item{categories}{levels of \code{x}}
@@ -23,22 +23,22 @@
#'
#' @section Deprecated Function:
#' \code{chisq_gof()} has been deprecated. Instead use
-#' \code{infer_chisq_gof_test()}
+#' \code{ifr_chisq_gof_test()}
#'
#' @seealso \code{\link[stats]{chisq.test}}
#' @references Sheskin, D. J. 2007. Handbook of Parametric and Nonparametric
#' Statistical Procedures, 4th edition. : Chapman & Hall/CRC.
#' @examples
-#' infer_chisq_gof_test(hsb, race, c(20, 20, 20, 140))
+#' ifr_chisq_gof_test(hsb, race, c(20, 20, 20, 140))
#'
#' # apply continuity correction
-#' infer_chisq_gof_test(hsb, race, c(20, 20, 20, 140), correct = TRUE)
+#' ifr_chisq_gof_test(hsb, race, c(20, 20, 20, 140), correct = TRUE)
#' @export
#'
-infer_chisq_gof_test <- function(data, x, y, correct = FALSE) UseMethod("infer_chisq_gof_test")
+ifr_chisq_gof_test <- function(data, x, y, correct = FALSE) UseMethod("ifr_chisq_gof_test")
#' @export
-infer_chisq_gof_test.default <- function(data, x, y, correct = FALSE) {
+ifr_chisq_gof_test.default <- function(data, x, y, correct = FALSE) {
x1 <- deparse(substitute(x))
xcheck <- data[[x1]]
@@ -92,12 +92,12 @@ infer_chisq_gof_test.default <- function(data, x, y, correct = FALSE) {
varname = varname
)
- class(result) <- "infer_chisq_gof_test"
+ class(result) <- "ifr_chisq_gof_test"
return(result)
}
#' @export
-print.infer_chisq_gof_test <- function(x, ...) {
+print.ifr_chisq_gof_test <- function(x, ...) {
print_chisq_gof(x)
}
@@ -110,7 +110,9 @@ chi_cort <- function(x, y) {
std <- round(diff / sqrt(y), 2)
chi <- round(sum(dif2 / y), 4)
- list(dev = dev, std = std, chi = chi)
+ list(dev = dev,
+ std = std,
+ chi = chi)
}
chigof <- function(x, y) {
@@ -121,5 +123,7 @@ chigof <- function(x, y) {
std <- round(dif / sqrt(y), 2)
chi <- round(sum(dif2 / y), 4)
- list(dev = dev, std = std, chi = chi)
+ list(dev = dev,
+ std = std,
+ chi = chi)
}
diff --git a/R/ifr-cochran-q-test.R b/R/ifr-cochran-q-test.R
index 9e4d19f..ad828db 100644
--- a/R/ifr-cochran-q-test.R
+++ b/R/ifr-cochran-q-test.R
@@ -3,8 +3,8 @@
#' equal in the same population.
#' @param data a \code{data.frame} or \code{tibble}
#' @param ... columns in \code{data}
-#' @return \code{infer_cochran_qtest} returns an object of class
-#' \code{"infer_cochran_qtest"}. An object of class \code{"infer_cochran_qtest"}
+#' @return \code{ifr_cochran_qtest} returns an object of class
+#' \code{"ifr_cochran_qtest"}. An object of class \code{"ifr_cochran_qtest"}
#' is a list containing the following components:
#'
#' \item{df}{degrees of freedom}
@@ -14,18 +14,18 @@
#'
#' @section Deprecated Function:
#' \code{cochran_test()} has been deprecated. Instead use
-#' \code{infer_cochran_qtest()}.
+#' \code{ifr_cochran_qtest()}.
#' @references Sheskin, D. J. 2007. Handbook of Parametric and Nonparametric
#' Statistical Procedures, 4th edition. : Chapman & Hall/CRC.
#'
#' @examples
-#' infer_cochran_qtest(exam, exam1, exam2, exam3)
+#' ifr_cochran_qtest(exam, exam1, exam2, exam3)
#' @export
#'
-infer_cochran_qtest <- function(data, ...) UseMethod("infer_cochran_qtest")
+ifr_cochran_qtest <- function(data, ...) UseMethod("ifr_cochran_qtest")
#' @export
-infer_cochran_qtest.default <- function(data, ...) {
+ifr_cochran_qtest.default <- function(data, ...) {
vars <- vapply(substitute(...()), deparse, NA_character_)
fdata <- data[vars]
@@ -47,13 +47,13 @@ infer_cochran_qtest.default <- function(data, ...) {
pvalue = k$pvalue,
q = k$q)
- class(result) <- "infer_cochran_qtest"
+ class(result) <- "ifr_cochran_qtest"
return(result)
}
#' @export
#'
-print.infer_cochran_qtest <- function(x, ...) {
+print.ifr_cochran_qtest <- function(x, ...) {
print_cochran_test(x)
}
diff --git a/R/ifr-launch-shiny-app.R b/R/ifr-launch-shiny-app.R
index aa2ae92..3e154fe 100644
--- a/R/ifr-launch-shiny-app.R
+++ b/R/ifr-launch-shiny-app.R
@@ -2,13 +2,13 @@
#' @description Launches shiny app
#' @examples
#' \dontrun{
-#' infer_launch_shiny_app()
+#' ifr_launch_shiny_app()
#' }
#' @export
#'
-infer_launch_shiny_app <- function() {
+ifr_launch_shiny_app <- function() {
- message("`infer_launch_shiny_app()` has been soft-deprecated and will be removed in the next release. In future, to launch the app, run the below code:\n
+ message("`ifr_launch_shiny_app()` has been soft-deprecated and will be removed in the next release. In future, to launch the app, run the below code:\n
- install.packages('xplorerr')\n - xplorerr::app_inference()\n")
check_suggests('descriptr')
diff --git a/R/ifr-levene-test.R b/R/ifr-levene-test.R
index 5a2ef04..a9d3dfe 100644
--- a/R/ifr-levene-test.R
+++ b/R/ifr-levene-test.R
@@ -1,5 +1,5 @@
#' @title Levene's test for equality of variances
-#' @description \code{infer_levene_test} reports Levene's robust test statistic
+#' @description \code{ifr_levene_test} reports Levene's robust test statistic
#' for the equality of variances and the
#' two statistics proposed by Brown and Forsythe that replace the mean in
#' Levene's formula with alternative location estimators. The first alternative
@@ -9,8 +9,8 @@
#' @param ... numeric; columns in \code{data}
#' @param group_var factor; column in \code{data}
#' @param trim_mean trimmed mean
-#' @return \code{infer_levene_test} returns an object of class \code{"infer_levene_test"}.
-#' An object of class \code{"infer_levene_test"} is a list containing the
+#' @return \code{ifr_levene_test} returns an object of class \code{"ifr_levene_test"}.
+#' An object of class \code{"ifr_levene_test"} is a list containing the
#' following components:
#'
#' \item{bf}{Brown and Forsythe f statistic}
@@ -30,7 +30,7 @@
#' \item{lens}{number of observations for each level of the grouping variable}
#' \item{type}{alternative hypothesis}
#' @section Deprecated Function:
-#' \code{levene_test()} has been deprecated. Instead use \code{infer_levene_test()}.
+#' \code{levene_test()} has been deprecated. Instead use \code{ifr_levene_test()}.
#' @references
#' {Bland, M. 2000. An Introduction to Medical Statistics. 3rd ed. Oxford: Oxford University Press.}
#'
@@ -39,18 +39,18 @@
#' {Carroll, R. J., and H. Schneider. 1985. A note on Levene’s tests for equality of variances. Statistics and Probability Letters 3: 191–194.}
#' @examples
#' # using grouping variable
-#' infer_levene_test(hsb, read, group_var = race)
+#' ifr_levene_test(hsb, read, group_var = race)
#'
#' # using variables
-#' infer_levene_test(hsb, read, write, socst)
+#' ifr_levene_test(hsb, read, write, socst)
#'
#' @export
#'
-infer_levene_test <- function(data, ...) UseMethod("infer_levene_test")
+ifr_levene_test <- function(data, ...) UseMethod("ifr_levene_test")
#' @export
-#' @rdname infer_levene_test
-infer_levene_test.default <- function(data, ..., group_var = NULL, trim_mean = 0.1) {
+#' @rdname ifr_levene_test
+ifr_levene_test.default <- function(data, ..., group_var = NULL, trim_mean = 0.1) {
groupvar <- deparse(substitute(group_var))
varyables <- vapply(substitute(...()), deparse, NA_character_)
@@ -98,14 +98,14 @@ infer_levene_test.default <- function(data, ..., group_var = NULL, trim_mean = 0
sd = k$sd,
sds = k$sds)
- class(out) <- "infer_levene_test"
+ class(out) <- "ifr_levene_test"
return(out)
}
#' @export
#'
-print.infer_levene_test <- function(x, ...) {
+print.ifr_levene_test <- function(x, ...) {
print_levene_test(x)
}
diff --git a/R/ifr-mcnemar-test.R b/R/ifr-mcnemar-test.R
index c8cbbf1..65fd78f 100644
--- a/R/ifr-mcnemar-test.R
+++ b/R/ifr-mcnemar-test.R
@@ -5,8 +5,8 @@
#' @param data a \code{data.frame} or \code{tibble}
#' @param x factor; column in \code{data}
#' @param y factor; column in \code{data}
-#' @return \code{infer_mcnemar_test} returns an object of class \code{"infer_mcnemar_test"}.
-#' An object of class \code{"infer_mcnemar_test"} is a list containing the
+#' @return \code{ifr_mcnemar_test} returns an object of class \code{"ifr_mcnemar_test"}.
+#' An object of class \code{"ifr_mcnemar_test"} is a list containing the
#' following components:
#'
#' \item{statistic}{chi square statistic}
@@ -26,7 +26,7 @@
#' \item{tbl}{two way table}
#' @section Deprecated Function:
#' \code{mcnermar_test()} has been deprecated. Instead use
-#' \code{infer_mcnemar_test()}.
+#' \code{ifr_mcnemar_test()}.
#' @references Sheskin, D. J. 2007. Handbook of Parametric and Nonparametric
#' Statistical Procedures, 4th edition. : Chapman & Hall/CRC.
#'
@@ -36,22 +36,22 @@
#' hb <- hsb
#' hb$himath <- ifelse(hsb$math > 60, 1, 0)
#' hb$hiread <- ifelse(hsb$read > 60, 1, 0)
-#' infer_mcnemar_test(hb, himath, hiread)
+#' ifr_mcnemar_test(hb, himath, hiread)
#'
#' # test if the proportion of students in himath and hiread group is same
#' himath <- ifelse(hsb$math > 60, 1, 0)
#' hiread <- ifelse(hsb$read > 60, 1, 0)
-#' infer_mcnemar_test(table(himath, hiread))
+#' ifr_mcnemar_test(table(himath, hiread))
#'
#' # using matrix
-#' infer_mcnemar_test(matrix(c(135, 18, 21, 26), nrow = 2))
+#' ifr_mcnemar_test(matrix(c(135, 18, 21, 26), nrow = 2))
#' @export
#'
-infer_mcnemar_test <- function(data, x = NULL, y = NULL) UseMethod("infer_mcnemar_test")
+ifr_mcnemar_test <- function(data, x = NULL, y = NULL) UseMethod("ifr_mcnemar_test")
#' @export
#'
-infer_mcnemar_test.default <- function(data, x = NULL, y = NULL) {
+ifr_mcnemar_test.default <- function(data, x = NULL, y = NULL) {
if (is.matrix(data) | is.table(data)) {
dat <- mcdata(data)
@@ -82,13 +82,13 @@ infer_mcnemar_test.default <- function(data, x = NULL, y = NULL) {
std_err = k$std_err,
tbl = dat)
- class(result) <- "infer_mcnemar_test"
+ class(result) <- "ifr_mcnemar_test"
return(result)
}
#' @export
#'
-print.infer_mcnemar_test <- function(x, ...) {
+print.ifr_mcnemar_test <- function(x, ...) {
print_mcnemar_test(x)
}
diff --git a/R/ifr-os-prop-test.R b/R/ifr-os-prop-test.R
index 76225f3..b809ca2 100644
--- a/R/ifr-os-prop-test.R
+++ b/R/ifr-os-prop-test.R
@@ -1,5 +1,5 @@
#' @title One Sample Test of Proportion
-#' @description \code{infer_os_prop_test} compares proportion in one group to a
+#' @description \code{ifr_os_prop_test} compares proportion in one group to a
#' specified population proportion.
#' @param data numeric vector of length 1 or a \code{data.frame} or \code{tibble}
#' @param variable factor; column in \code{data}
@@ -8,8 +8,8 @@
#' @param alternative a character string specifying the alternative hypothesis,
#' must be one of "both" (default), "greater", "less" or "all". You can specify
#' just the initial letter.
-#' @return \code{infer_os_prop_test} returns an object of class \code{"infer_os_prop_test"}.
-#' An object of class \code{"infer_os_prop_test"} is a list containing the
+#' @return \code{ifr_os_prop_test} returns an object of class \code{"ifr_os_prop_test"}.
+#' An object of class \code{"ifr_os_prop_test"} is a list containing the
#' following components:
#'
#' \item{n}{number of observations}
@@ -23,26 +23,26 @@
#' \item{deviation}{deviation of observed from expected}
#' \item{std}{standardized resiudals}
#' @section Deprecated Function:
-#' \code{prop_test()} has been deprecated. Instead use \code{infer_os_prop_test()}.
+#' \code{prop_test()} has been deprecated. Instead use \code{ifr_os_prop_test()}.
#' @references Sheskin, D. J. 2007. Handbook of Parametric and Nonparametric
#' Statistical Procedures, 4th edition. : Chapman & Hall/CRC.
#' @seealso \code{\link[stats]{prop.test}} \code{\link[stats]{binom.test}}
#' @examples
#' # use as a calculator
-#' infer_os_prop_test(200, prob = 0.5, phat = 0.3)
+#' ifr_os_prop_test(200, prob = 0.5, phat = 0.3)
#'
#' # using data set
-#' infer_os_prop_test(hsb, female, prob = 0.5)
+#' ifr_os_prop_test(hsb, female, prob = 0.5)
#' @export
#'
-infer_os_prop_test <- function(data, variable = NULL, prob = 0.5, phat = 0.5,
+ifr_os_prop_test <- function(data, variable = NULL, prob = 0.5, phat = 0.5,
alternative = c("both", "less", "greater", "all"))
- UseMethod("infer_os_prop_test")
+ UseMethod("ifr_os_prop_test")
#' @export
-#' @rdname infer_os_prop_test
+#' @rdname ifr_os_prop_test
#'
-infer_os_prop_test.default <- function(data, variable = NULL, prob = 0.5, phat = 0.5,
+ifr_os_prop_test.default <- function(data, variable = NULL, prob = 0.5, phat = 0.5,
alternative = c("both", "less", "greater", "all")) {
if (is.numeric(data)) {
@@ -73,13 +73,13 @@ infer_os_prop_test.default <- function(data, variable = NULL, prob = 0.5, phat =
std = k$std,
z = k$z)
- class(result) <- "infer_os_prop_test"
+ class(result) <- "ifr_os_prop_test"
return(result)
}
#' @export
#'
-print.infer_os_prop_test <- function(x, ...) {
+print.ifr_os_prop_test <- function(x, ...) {
print_prop_test(x)
}
diff --git a/R/ifr-os-t-test.R b/R/ifr-os-t-test.R
index 44aa943..d5ed7cb 100644
--- a/R/ifr-os-t-test.R
+++ b/R/ifr-os-t-test.R
@@ -1,5 +1,5 @@
#' @title One Sample t Test
-#' @description \code{infer_os_t_test} performs t tests on the equality of means. It tests the
+#' @description \code{ifr_os_t_test} performs t tests on the equality of means. It tests the
#' hypothesis that a sample has a mean equal to a hypothesized value.
#' @param data a \code{data.frame} or \code{tibble}
#' @param x numeric; column in \code{data}
@@ -9,8 +9,8 @@
#' one of "both" (default), "greater", "less" or "all". You can specify just the
#' initial letter
#' @param ... additional arguments passed to or from other methods
-#' @return \code{infer_os_t_test} returns an object of class \code{"infer_os_t_test"}.
-#' An object of class \code{"infer_os_t_test"} is a list containing the
+#' @return \code{ifr_os_t_test} returns an object of class \code{"ifr_os_t_test"}.
+#' An object of class \code{"ifr_os_t_test"} is a list containing the
#' following components:
#'
#' \item{mu}{a number indicating the true value of the mean}
@@ -31,32 +31,32 @@
#' \item{type}{alternative hypothesis}
#' \item{var_name}{name of \code{x}}
#' @section Deprecated Function:
-#' \code{ttest()} has been deprecated. Instead use \code{infer_os_t_test()}.
+#' \code{ttest()} has been deprecated. Instead use \code{ifr_os_t_test()}.
#' @references Sheskin, D. J. 2007. Handbook of Parametric and Nonparametric
#' Statistical Procedures, 4th edition. : Chapman & Hall/CRC.
#' @seealso \code{\link[stats]{t.test}}
#'
#' @examples
#' # lower tail
-#' infer_os_t_test(hsb, write, mu = 50, alternative = 'less')
+#' ifr_os_t_test(hsb, write, mu = 50, alternative = 'less')
#'
#' # upper tail
-#' infer_os_t_test(hsb, write, mu = 50, alternative = 'greater')
+#' ifr_os_t_test(hsb, write, mu = 50, alternative = 'greater')
#'
#' # both tails
-#' infer_os_t_test(hsb, write, mu = 50, alternative = 'both')
+#' ifr_os_t_test(hsb, write, mu = 50, alternative = 'both')
#'
#' # all tails
-#' infer_os_t_test(hsb, write, mu = 50, alternative = 'all')
+#' ifr_os_t_test(hsb, write, mu = 50, alternative = 'all')
#'
#' @export
#'
-infer_os_t_test <- function(data, x, mu = 0, alpha = 0.05,
- alternative = c("both", "less", "greater", "all"), ...) UseMethod("infer_os_t_test")
+ifr_os_t_test <- function(data, x, mu = 0, alpha = 0.05,
+ alternative = c("both", "less", "greater", "all"), ...) UseMethod("ifr_os_t_test")
#' @export
#'
-infer_os_t_test.default <- function(data, x, mu = 0, alpha = 0.05,
+ifr_os_t_test.default <- function(data, x, mu = 0, alpha = 0.05,
alternative = c("both", "less", "greater", "all"), ...) {
x1 <- deparse(substitute(x))
@@ -95,13 +95,13 @@ infer_os_t_test.default <- function(data, x, mu = 0, alpha = 0.05,
type = type,
var_name = var_name)
- class(result) <- "infer_os_t_test"
+ class(result) <- "ifr_os_t_test"
return(result)
}
#' @export
#'
-print.infer_os_t_test <- function(x, ...) {
+print.ifr_os_t_test <- function(x, ...) {
print_ttest(x)
}
diff --git a/R/ifr-os-var-test.R b/R/ifr-os-var-test.R
index a171b59..8639ccd 100644
--- a/R/ifr-os-var-test.R
+++ b/R/ifr-os-var-test.R
@@ -1,5 +1,5 @@
#' @title One Sample Variance Comparison Test
-#' @description \code{infer_os_var_test} performs tests on the equality of standard
+#' @description \code{ifr_os_var_test} performs tests on the equality of standard
#' deviations (variances).It tests that the standard deviation of a sample is
#' equal to a hypothesized value.
#' @param data a \code{data.frame} or \code{tibble}
@@ -10,8 +10,8 @@
#' must be one of "both" (default), "greater", "less" or "all". You can specify
#' just the initial letter
#' @param ... additional arguments passed to or from other methods
-#' @return \code{infer_os_var_test} returns an object of class \code{"infer_os_var_test"}.
-#' An object of class \code{"infer_os_var_test"} is a list containing the
+#' @return \code{ifr_os_var_test} returns an object of class \code{"ifr_os_var_test"}.
+#' An object of class \code{"ifr_os_var_test"} is a list containing the
#' following components:
#'
#' \item{n}{number of observations}
@@ -30,30 +30,30 @@
#' \item{conf}{confidence level}
#' \item{type}{alternative hypothesis}
#' @section Deprecated Function:
-#' \code{os_vartest()} has been deprecated. Instead use \code{infer_os_var_test()}.
+#' \code{os_vartest()} has been deprecated. Instead use \code{ifr_os_var_test()}.
#' @references Sheskin, D. J. 2007. Handbook of Parametric and Nonparametric
#' Statistical Procedures, 4th edition. : Chapman & Hall/CRC.
#' @seealso \code{\link[stats]{var.test}}
#' @examples
#' # lower tail
-#' infer_os_var_test(mtcars, mpg, 5, alternative = 'less')
+#' ifr_os_var_test(mtcars, mpg, 5, alternative = 'less')
#'
#' # upper tail
-#' infer_os_var_test(mtcars, mpg, 5, alternative = 'greater')
+#' ifr_os_var_test(mtcars, mpg, 5, alternative = 'greater')
#'
#' # both tails
-#' infer_os_var_test(mtcars, mpg, 5, alternative = 'both')
+#' ifr_os_var_test(mtcars, mpg, 5, alternative = 'both')
#'
#' # all tails
-#' infer_os_var_test(mtcars, mpg, 5, alternative = 'all')
+#' ifr_os_var_test(mtcars, mpg, 5, alternative = 'all')
#' @export
#'
-infer_os_var_test <- function(data, x, sd, confint = 0.95,
- alternative = c("both", "less", "greater", "all"), ...) UseMethod("infer_os_var_test")
+ifr_os_var_test <- function(data, x, sd, confint = 0.95,
+ alternative = c("both", "less", "greater", "all"), ...) UseMethod("ifr_os_var_test")
#' @export
#'
-infer_os_var_test.default <- function(data, x, sd, confint = 0.95,
+ifr_os_var_test.default <- function(data, x, sd, confint = 0.95,
alternative = c("both", "less", "greater", "all"), ...) {
x1 <- deparse(substitute(x))
@@ -92,13 +92,13 @@ infer_os_var_test.default <- function(data, x, sd, confint = 0.95,
var_name = varname,
xbar = round(k$xbar, 4))
- class(result) <- "infer_os_var_test"
+ class(result) <- "ifr_os_var_test"
return(result)
}
#' @export
#'
-print.infer_os_var_test <- function(x, ...) {
+print.ifr_os_var_test <- function(x, ...) {
print_os_vartest(x)
}
diff --git a/R/ifr-runs-test.R b/R/ifr-runs-test.R
index a7acbe0..b86b7cf 100644
--- a/R/ifr-runs-test.R
+++ b/R/ifr-runs-test.R
@@ -14,8 +14,8 @@
#' @param mean logical; if TRUE, mean will be used as threshold
#' @param threshold threshold to be used for counting runs, specify 0 if data
#' is coded as a binary.
-#' @return \code{infer_runs_test} returns an object of class \code{"infer_runs_test"}.
-#' An object of class \code{"infer_runs_test"} is a list containing the
+#' @return \code{ifr_runs_test} returns an object of class \code{"ifr_runs_test"}.
+#' An object of class \code{"ifr_runs_test"} is a list containing the
#' following components:
#'
#' \item{n}{number of observations}
@@ -28,7 +28,7 @@
#' \item{z}{z statistic}
#' \item{p}{p-value of \code{z}}
#' @section Deprecated Function:
-#' \code{runs_test()} has been deprecated. Instead use \code{infer_runs_test()}.
+#' \code{runs_test()} has been deprecated. Instead use \code{ifr_runs_test()}.
#' @references
#' {Sheskin, D. J. 2007. Handbook of Parametric and Nonparametric Statistical Procedures, 4th edition. : Chapman & Hall/CRC.}
#'
@@ -38,26 +38,26 @@
#'
#' {Swed, F. S., and C. Eisenhart. 1943. Tables for testing randomness of grouping in a sequence of alternatives. Annals of Mathematical Statistics 14: 66–87.}
#' @examples
-#' infer_runs_test(hsb, read)
+#' ifr_runs_test(hsb, read)
#'
-#' infer_runs_test(hsb, read, drop = TRUE)
+#' ifr_runs_test(hsb, read, drop = TRUE)
#'
-#' infer_runs_test(hsb, read, split = TRUE)
+#' ifr_runs_test(hsb, read, split = TRUE)
#'
-#' infer_runs_test(hsb, read, mean = TRUE)
+#' ifr_runs_test(hsb, read, mean = TRUE)
#'
-#' infer_runs_test(hsb, read, threshold = 0)
+#' ifr_runs_test(hsb, read, threshold = 0)
#'
#' @importFrom stats pnorm
#'
#' @export
#'
-infer_runs_test <- function(data, x, drop = FALSE, split = FALSE, mean = FALSE,
- threshold = NA) UseMethod("infer_runs_test")
+ifr_runs_test <- function(data, x, drop = FALSE, split = FALSE, mean = FALSE,
+ threshold = NA) UseMethod("ifr_runs_test")
#' @export
#'
-infer_runs_test.default <- function(data, x, drop = FALSE,
+ifr_runs_test.default <- function(data, x, drop = FALSE,
split = FALSE, mean = FALSE,
threshold = NA) {
@@ -114,13 +114,13 @@ infer_runs_test.default <- function(data, x, drop = FALSE,
var = sd_runs,
z = test_stat)
- class(result) <- "infer_runs_test"
+ class(result) <- "ifr_runs_test"
return(result)
}
#' @export
#'
-print.infer_runs_test <- function(x, ...) {
+print.ifr_runs_test <- function(x, ...) {
print_runs_test(x)
}
diff --git a/R/ifr-ts-ind-ttest.R b/R/ifr-ts-ind-ttest.R
index 5b57381..e81f57d 100644
--- a/R/ifr-ts-ind-ttest.R
+++ b/R/ifr-ts-ind-ttest.R
@@ -1,5 +1,5 @@
#' @title Two Independent Sample t Test
-#' @description \code{infer_ts_ind_ttest} compares the means of two independent groups in order to determine whether
+#' @description \code{ifr_ts_ind_ttest} compares the means of two independent groups in order to determine whether
#' there is statistical evidence that the associated population means are significantly different.
#' @param data a data frame
#' @param x factor; a column in \code{data}
@@ -9,8 +9,8 @@
#' must be one of "both" (default), "greater", "less" or "all". You can specify
#' just the initial letter
#' @param ... additional arguments passed to or from other methods
-#' @return \code{infer_ts_ind_ttest} returns an object of class \code{"infer_ts_ind_ttest"}.
-#' An object of class \code{"infer_ts_ind_ttest"} is a list containing the
+#' @return \code{ifr_ts_ind_ttest} returns an object of class \code{"ifr_ts_ind_ttest"}.
+#' An object of class \code{"ifr_ts_ind_ttest"} is a list containing the
#' following components:
#'
#' \item{levels}{levels of \code{x}}
@@ -45,30 +45,30 @@
#' \item{confint}{confidence level}
#' \item{alternative}{alternative hypothesis}
#' @section Deprecated Function:
-#' \code{ind_ttest()} has been deprecated. Instead use \code{infer_ts_ind_ttest()}.
+#' \code{ind_ttest()} has been deprecated. Instead use \code{ifr_ts_ind_ttest()}.
#' @references Sheskin, D. J. 2007. Handbook of Parametric and Nonparametric
#' Statistical Procedures, 4th edition. : Chapman & Hall/CRC.
#' @seealso \code{\link[stats]{t.test}}
#' @examples
#' # lower tail
-#' infer_ts_ind_ttest(hsb, female, write, alternative = 'less')
+#' ifr_ts_ind_ttest(hsb, female, write, alternative = 'less')
#'
#' # upper tail
-#' infer_ts_ind_ttest(hsb, female, write, alternative = 'greater')
+#' ifr_ts_ind_ttest(hsb, female, write, alternative = 'greater')
#'
#' # both tails
-#' infer_ts_ind_ttest(hsb, female, write, alternative = 'both')
+#' ifr_ts_ind_ttest(hsb, female, write, alternative = 'both')
#'
#' # all tails
-#' infer_ts_ind_ttest(hsb, female, write, alternative = 'all')
+#' ifr_ts_ind_ttest(hsb, female, write, alternative = 'all')
#' @export
#'
-infer_ts_ind_ttest <- function(data, x, y, confint = 0.95,
- alternative = c("both", "less", "greater", "all"), ...) UseMethod("infer_ts_ind_ttest")
+ifr_ts_ind_ttest <- function(data, x, y, confint = 0.95,
+ alternative = c("both", "less", "greater", "all"), ...) UseMethod("ifr_ts_ind_ttest")
#' @export
#'
-infer_ts_ind_ttest.default <- function(data, x, y, confint = 0.95,
+ifr_ts_ind_ttest.default <- function(data, x, y, confint = 0.95,
alternative = c("both", "less", "greater", "all"), ...) {
x1 <- deparse(substitute(x))
@@ -126,14 +126,14 @@ infer_ts_ind_ttest.default <- function(data, x, y, confint = 0.95,
upper = g_stat[, 9],
var_y = var_y)
- class(result) <- "infer_ts_ind_ttest"
+ class(result) <- "ifr_ts_ind_ttest"
return(result)
}
#' @export
#'
-print.infer_ts_ind_ttest <- function(x, ...) {
+print.ifr_ts_ind_ttest <- function(x, ...) {
print_two_ttest(x)
}
diff --git a/R/ifr-ts-paired-ttest.R b/R/ifr-ts-paired-ttest.R
index 70b2476..0a2897c 100644
--- a/R/ifr-ts-paired-ttest.R
+++ b/R/ifr-ts-paired-ttest.R
@@ -1,5 +1,5 @@
#' @title Paired t test
-#' @description \code{infer_ts_paired_ttest} tests that two samples have the
+#' @description \code{ifr_ts_paired_ttest} tests that two samples have the
#' same mean, assuming paired data.
#' @param data a \code{data.frame} or \code{tibble}
#' @param x numeric; column in \code{data}
@@ -8,8 +8,8 @@
#' @param alternative a character string specifying the alternative hypothesis, must be
#' one of "both" (default), "greater", "less" or "all". You can specify just the
#' initial letter.
-#' @return \code{infer_ts_paired_ttest} returns an object of class \code{"infer_ts_paired_ttest"}.
-#' An object of class \code{"infer_ts_paired_ttest"} is a list containing the
+#' @return \code{ifr_ts_paired_ttest} returns an object of class \code{"ifr_ts_paired_ttest"}.
+#' An object of class \code{"ifr_ts_paired_ttest"} is a list containing the
#' following components:
#'
#' \item{Obs}{number of observations}
@@ -32,30 +32,30 @@
#' \item{xy}{string used in printing results of the test}
#' @section Deprecated Function:
#' \code{paired_ttest()} has been deprecated. Instead use
-#' \code{infer_ts_paired_ttest()}.
+#' \code{ifr_ts_paired_ttest()}.
#' @references Sheskin, D. J. 2007. Handbook of Parametric and Nonparametric
#' Statistical Procedures, 4th edition. : Chapman & Hall/CRC.
#' @seealso \code{\link[stats]{t.test}}
#' @examples
#' # lower tail
-#' infer_ts_paired_ttest(hsb, read, write, alternative = 'less')
+#' ifr_ts_paired_ttest(hsb, read, write, alternative = 'less')
#'
#' # upper tail
-#' infer_ts_paired_ttest(hsb, read, write, alternative = 'greater')
+#' ifr_ts_paired_ttest(hsb, read, write, alternative = 'greater')
#'
#' # both tails
-#' infer_ts_paired_ttest(hsb, read, write, alternative = 'both')
+#' ifr_ts_paired_ttest(hsb, read, write, alternative = 'both')
#'
#' # all tails
-#' infer_ts_paired_ttest(hsb, read, write, alternative = 'all')
+#' ifr_ts_paired_ttest(hsb, read, write, alternative = 'all')
#' @export
#'
-infer_ts_paired_ttest <- function(data, x, y, confint = 0.95,
- alternative = c("both", "less", "greater", "all")) UseMethod("infer_ts_paired_ttest")
+ifr_ts_paired_ttest <- function(data, x, y, confint = 0.95,
+ alternative = c("both", "less", "greater", "all")) UseMethod("ifr_ts_paired_ttest")
#' @export
#'
-infer_ts_paired_ttest.default <- function(data, x, y, confint = 0.95,
+ifr_ts_paired_ttest.default <- function(data, x, y, confint = 0.95,
alternative = c("both", "less", "greater", "all")) {
x1 <- deparse(substitute(x))
@@ -76,13 +76,13 @@ infer_ts_paired_ttest.default <- function(data, x, y, confint = 0.95,
xy = k$xy, df = k$df, alternative = method, confint = confint
)
- class(result) <- "infer_ts_paired_ttest"
+ class(result) <- "ifr_ts_paired_ttest"
return(result)
}
#' @export
#'
-print.infer_ts_paired_ttest <- function(x, ...) {
+print.ifr_ts_paired_ttest <- function(x, ...) {
print_paired_ttest(x)
}
diff --git a/R/ifr-ts-prop-test.R b/R/ifr-ts-prop-test.R
index 64e70e6..e8e568d 100644
--- a/R/ifr-ts-prop-test.R
+++ b/R/ifr-ts-prop-test.R
@@ -15,8 +15,8 @@
#' must be one of "both" (default), "greater", "less" or "all". You can specify
#' just the initial letter
#' @param ... additional arguments passed to or from other methods
-#' @return an object of class \code{"infer_ts_prop_test"}.
-#' An object of class \code{"infer_ts_prop_test"} is a list containing the
+#' @return an object of class \code{"ifr_ts_prop_test"}.
+#' An object of class \code{"ifr_ts_prop_test"} is a list containing the
#' following components:
#'
#' \item{n1}{sample 1 size}
@@ -27,36 +27,36 @@
#' \item{sig}{p-value for z statistic}
#' \item{alt}{alternative hypothesis}
#' @section Deprecated Functions:
-#' \code{infer_ts_prop_test()}, \code{infer_ts_prop_grp()} and \code{infer_ts_prop_calc()} have
-#' been deprecated. Instead use \code{infer_ts_prop_test()},
-#' \code{infer_ts_prop_group()} and \code{infer_ts_prop_calc()}.
+#' \code{ifr_ts_prop_test()}, \code{ifr_ts_prop_grp()} and \code{ifr_ts_prop_calc()} have
+#' been deprecated. Instead use \code{ifr_ts_prop_test()},
+#' \code{ifr_ts_prop_group()} and \code{ifr_ts_prop_calc()}.
#' @references Sheskin, D. J. 2007. Handbook of Parametric and Nonparametric
#' Statistical Procedures, 4th edition. : Chapman & Hall/CRC.
#' @seealso \code{\link[stats]{prop.test}}
#' @examples
#' # using variables
#' # lower tail
-#' infer_ts_prop_test(treatment, treatment1, treatment2,
+#' ifr_ts_prop_test(treatment, treatment1, treatment2,
#' alternative = 'less')
#'
#' # using groups
#' # lower tail
-#' infer_ts_prop_group(treatment2, outcome, female,
+#' ifr_ts_prop_group(treatment2, outcome, female,
#' alternative = 'less')
#'
#' # using sample size and proportions
#' # lower tail
-#' infer_ts_prop_calc(n1 = 30, n2 = 25, p1 = 0.3, p2 = 0.5, alternative = 'less')
+#' ifr_ts_prop_calc(n1 = 30, n2 = 25, p1 = 0.3, p2 = 0.5, alternative = 'less')
#'
#' @export
#'
-infer_ts_prop_test <- function(data, var1, var2,
+ifr_ts_prop_test <- function(data, var1, var2,
alternative = c("both", "less", "greater", "all"), ...)
- UseMethod("infer_ts_prop_test")
+ UseMethod("ifr_ts_prop_test")
#' @export
#'
-infer_ts_prop_test.default <- function(data, var1, var2,
+ifr_ts_prop_test.default <- function(data, var1, var2,
alternative = c("both", "less", "greater", "all"), ...) {
var_1 <- deparse(substitute(var1))
@@ -76,30 +76,30 @@ infer_ts_prop_test.default <- function(data, var1, var2,
sig = k$sig,
z = k$z)
- class(result) <- "infer_ts_prop_test"
+ class(result) <- "ifr_ts_prop_test"
return(result)
}
#' @export
-#' @rdname infer_ts_prop_test
+#' @rdname ifr_ts_prop_test
#' @usage NULL
#'
-infer_ts_prop_calc <- function(n1, n2, p1, p2,
+ifr_ts_prop_calc <- function(n1, n2, p1, p2,
alternative = c("both", "less", "greater", "all"), ...) {
- .Deprecated("infer_ts_prop_calc()")
+ .Deprecated("ifr_ts_prop_calc()")
}
#' @export
#'
-print.infer_ts_prop_test <- function(x, ...) {
+print.ifr_ts_prop_test <- function(x, ...) {
print_ts_prop_test(x)
}
#' @export
-#' @rdname infer_ts_prop_test
+#' @rdname ifr_ts_prop_test
#'
-infer_ts_prop_group <- function(data, var, group,
+ifr_ts_prop_group <- function(data, var, group,
alternative = c("both", "less", "greater", "all")) {
var1 <- deparse(substitute(var))
@@ -152,14 +152,14 @@ infer_ts_prop_group <- function(data, var, group,
sig = round(sig, 3),
z = round(z, 3))
- class(out) <- "infer_ts_prop_test"
+ class(out) <- "ifr_ts_prop_test"
return(out)
}
#' @export
-#' @rdname infer_ts_prop_test
+#' @rdname ifr_ts_prop_test
#'
-infer_ts_prop_calc <- function(n1, n2, p1, p2,
+ifr_ts_prop_calc <- function(n1, n2, p1, p2,
alternative = c("both", "less", "greater", "all"), ...) {
n1 <- n1
n2 <- n2
@@ -197,7 +197,7 @@ infer_ts_prop_calc <- function(n1, n2, p1, p2,
sig = round(sig, 3),
z = round(z, 3))
- class(out) <- "infer_ts_prop_test"
+ class(out) <- "ifr_ts_prop_test"
return(out)
}
diff --git a/R/ifr-ts-var-test.R b/R/ifr-ts-var-test.R
index e4eec4a..09664de 100644
--- a/R/ifr-ts-var-test.R
+++ b/R/ifr-ts-var-test.R
@@ -1,5 +1,5 @@
#' @title Two Sample Variance Comparison Test
-#' @description \code{infer_ts_var_test} performs tests on the equality of standard
+#' @description \code{ifr_ts_var_test} performs tests on the equality of standard
#' deviations (variances).
#' @param data a \code{data.frame} or \code{tibble}
#' @param ... numeric; column(s) in \code{data}
@@ -7,8 +7,8 @@
#' @param alternative a character string specifying the alternative hypothesis,
#' must be one of "both" (default), "greater", "less" or "all". You can specify
#' just the initial letter.
-#' @return \code{infer_ts_var_test} returns an object of class \code{"infer_ts_var_test"}.
-#' An object of class \code{"infer_ts_var_test"} is a list containing the
+#' @return \code{ifr_ts_var_test} returns an object of class \code{"ifr_ts_var_test"}.
+#' An object of class \code{"ifr_ts_var_test"} is a list containing the
#' following components:
#'
#' \item{f}{f statistic}
@@ -29,25 +29,25 @@
#' \item{lev}{levels of the grouping variable}
#' \item{type}{alternative hypothesis}
#' @section Deprecated Function:
-#' \code{var_test()} has been deprecated. Instead use \code{infer_ts_var_test()}.
+#' \code{var_test()} has been deprecated. Instead use \code{ifr_ts_var_test()}.
#' @references Sheskin, D. J. 2007. Handbook of Parametric and Nonparametric
#' Statistical Procedures, 4th edition. : Chapman & Hall/CRC.
#' @seealso \code{\link[stats]{var.test}}
#' @examples
#' # using grouping variable
-#' infer_ts_var_test(hsb, read, group_var = female, alternative = 'less')
+#' ifr_ts_var_test(hsb, read, group_var = female, alternative = 'less')
#'
#' # using two variables
-#' infer_ts_var_test(hsb, read, write, alternative = 'less')
+#' ifr_ts_var_test(hsb, read, write, alternative = 'less')
#'
#' @export
#'
-infer_ts_var_test <- function(data, ..., group_var = NULL,
- alternative = c("less", "greater", "all")) UseMethod("infer_ts_var_test")
+ifr_ts_var_test <- function(data, ..., group_var = NULL,
+ alternative = c("less", "greater", "all")) UseMethod("ifr_ts_var_test")
#' @export
#'
-infer_ts_var_test.default <- function(data, ..., group_var = NULL,
+ifr_ts_var_test.default <- function(data, ..., group_var = NULL,
alternative = c("less", "greater", "all")) {
groupvar <- deparse(substitute(group_var))
@@ -100,13 +100,13 @@ infer_ts_var_test.default <- function(data, ..., group_var = NULL,
upper = k$upper,
vars = k$vars)
- class(out) <- "infer_ts_var_test"
+ class(out) <- "ifr_ts_var_test"
return(out)
}
#' @export
#'
-print.infer_ts_var_test <- function(x, ...) {
+print.ifr_ts_var_test <- function(x, ...) {
print_var_test(x)
}
diff --git a/README.Rmd b/README.Rmd
index c96ce25..8fb39a6 100644
--- a/README.Rmd
+++ b/README.Rmd
@@ -68,31 +68,31 @@ library(inferr)
```
```{r infer1}
-infer_os_t_test(hsb, write, mu = 50, type = 'all')
+ifr_os_t_test(hsb, write, mu = 50, type = 'all')
```
#### ANOVA
```{r anova}
-infer_oneway_anova(hsb, write, prog)
+ifr_oneway_anova(hsb, write, prog)
```
#### Chi Square Test of Independence
```{r chi1}
-infer_chisq_assoc_test(hsb, female, schtyp)
+ifr_chisq_assoc_test(hsb, female, schtyp)
```
#### Levene's Test
```{r lev1}
-infer_levene_test(hsb, read, group_var = race)
+ifr_levene_test(hsb, read, group_var = race)
```
#### Cochran's Q Test
```{r cochran}
-infer_cochran_qtest(exam, exam1, exam2, exam3)
+ifr_cochran_qtest(exam, exam1, exam2, exam3)
```
#### McNemar Test
@@ -101,7 +101,7 @@ infer_cochran_qtest(exam, exam1, exam2, exam3)
hb <- hsb
hb$himath <- ifelse(hsb$math > 60, 1, 0)
hb$hiread <- ifelse(hsb$read > 60, 1, 0)
-infer_mcnemar_test(hb, himath, hiread)
+ifr_mcnemar_test(hb, himath, hiread)
```
## Getting Help
diff --git a/README.md b/README.md
index 1603e2e..d944f36 100644
--- a/README.md
+++ b/README.md
@@ -64,7 +64,7 @@ devtools::install_github("rsquaredacademy/inferr")
#### One Sample t Test
``` r
-infer_os_t_test(hsb, write, mu = 50, type = 'all')
+ifr_os_t_test(hsb, write, mu = 50, type = 'all')
#> One-Sample Statistics
#> ---------------------------------------------------------------------------------
#> Variable Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
@@ -87,7 +87,7 @@ infer_os_t_test(hsb, write, mu = 50, type = 'all')
#### ANOVA
``` r
-infer_oneway_anova(hsb, write, prog)
+ifr_oneway_anova(hsb, write, prog)
#> ANOVA
#> ----------------------------------------------------------------------
#> Sum of
@@ -114,7 +114,7 @@ infer_oneway_anova(hsb, write, prog)
#### Chi Square Test of Independence
``` r
-infer_chisq_assoc_test(hsb, female, schtyp)
+ifr_chisq_assoc_test(hsb, female, schtyp)
#> Chi Square Statistics
#>
#> Statistics DF Value Prob
@@ -132,7 +132,7 @@ infer_chisq_assoc_test(hsb, female, schtyp)
#### Levene’s Test
``` r
-infer_levene_test(hsb, read, group_var = race)
+ifr_levene_test(hsb, read, group_var = race)
#> Summary Statistics
#> Levels Frequency Mean Std. Dev
#> -----------------------------------------
@@ -157,7 +157,7 @@ infer_levene_test(hsb, read, group_var = race)
#### Cochran’s Q Test
``` r
-infer_cochran_qtest(exam, exam1, exam2, exam3)
+ifr_cochran_qtest(exam, exam1, exam2, exam3)
#> Test Statistics
#> ----------------------
#> N 15
@@ -173,7 +173,7 @@ infer_cochran_qtest(exam, exam1, exam2, exam3)
hb <- hsb
hb$himath <- ifelse(hsb$math > 60, 1, 0)
hb$hiread <- ifelse(hsb$read > 60, 1, 0)
-infer_mcnemar_test(hb, himath, hiread)
+ifr_mcnemar_test(hb, himath, hiread)
#> Controls
#> ---------------------------------
#> Cases 0 1 Total
diff --git a/_pkgdown.yml b/_pkgdown.yml
index 9e9188a..d6d0a35 100644
--- a/_pkgdown.yml
+++ b/_pkgdown.yml
@@ -28,6 +28,10 @@ navbar:
href: reference/index.html
- text: "News"
href: news/index.html
+ - text: "Blog"
+ href: https://blog.rsquaredacademy.com
+ - text: "Online Courses"
+ href: https://rsquared-academy.thinkific.com
right:
- icon: fa-github
href: https://github.com/rsquaredacademy/inferr
@@ -45,31 +49,31 @@ reference:
- title: Parametric Tests
contents:
- - infer_binom_calc
- - infer_binom_test
- - infer_levene_test
- - infer_os_prop_test
- - infer_os_t_test
- - infer_os_var_test
- - infer_ts_ind_ttest
- - infer_ts_paired_ttest
- - infer_ts_prop_test
- - infer_ts_var_test
+ - ifr_binom_calc
+ - ifr_binom_test
+ - ifr_levene_test
+ - ifr_os_prop_test
+ - ifr_os_t_test
+ - ifr_os_var_test
+ - ifr_ts_ind_ttest
+ - ifr_ts_paired_ttest
+ - ifr_ts_prop_test
+ - ifr_ts_var_test
- title: Non-parametric Tests
contents:
- - infer_chisq_assoc_test
- - infer_chisq_gof_test
- - infer_cochran_qtest
- - infer_mcnemar_test
- - infer_runs_test
+ - ifr_chisq_assoc_test
+ - ifr_chisq_gof_test
+ - ifr_cochran_qtest
+ - ifr_mcnemar_test
+ - ifr_runs_test
- title: ANOVA
contents:
- - infer_oneway_anova
+ - ifr_oneway_anova
- title: Data
desc: >
diff --git a/docs/404.html b/docs/404.html
index d2cad67..681d5bd 100644
--- a/docs/404.html
+++ b/docs/404.html
@@ -106,6 +106,12 @@
News
+
+
+ Blog
+
+
+ Online Courses
diff --git a/docs/CONDUCT.html b/docs/CONDUCT.html
index 53a31aa..78200ad 100644
--- a/docs/CONDUCT.html
+++ b/docs/CONDUCT.html
@@ -106,6 +106,12 @@
News
+
+
+ Blog
+
+
+ Online Courses
diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html
index f9eacef..4ecb11a 100644
--- a/docs/LICENSE-text.html
+++ b/docs/LICENSE-text.html
@@ -106,6 +106,12 @@
News
+
+
+ Blog
+
+
+ Online Courses
diff --git a/docs/articles/index.html b/docs/articles/index.html
index cb6ebe6..67f97a1 100644
--- a/docs/articles/index.html
+++ b/docs/articles/index.html
@@ -106,6 +106,12 @@
News
+
+
+ Blog
+
+
+ Online Courses
diff --git a/docs/articles/intro.html b/docs/articles/intro.html
index d66d869..f35b330 100644
--- a/docs/articles/intro.html
+++ b/docs/articles/intro.html
@@ -66,6 +66,12 @@
News
+
+
+ Blog
+
+
+ Online Courses
## One-Sample Statistics
## ---------------------------------------------------------------------------------
## Variable Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
@@ -160,7 +166,7 @@
Using the hsb data, test whether the mean of read is equal to the mean of write.
+ifr_ts_paired_ttest(hsb, read, write, alternative = 'less')
## Paired Samples Statistics
## ----------------------------------------------------------------------------
## Variables Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
@@ -189,7 +195,7 @@
## ----------------------------------------
+ifr_ts_paired_ttest(hsb, read, write, alternative = 'all')
## Paired Samples Statistics
## ----------------------------------------------------------------------------
## Variables Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
@@ -226,7 +232,7 @@
Example
Using the hsb data, test whether the mean for write is the same for males and females.
+ifr_ts_ind_ttest(hsb, female, write, alternative = 'all')
## Group Statistics
## -----------------------------------------------------------------------------
## Group Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
@@ -275,7 +281,7 @@
Using hsb data, test whether the proportion of females is 50%.
+ifr_os_prop_test(hsb, female, prob = 0.5)
## Test Statistics
## -------------------------
## Sample Size 200
@@ -293,7 +299,7 @@
Using Calculator
+ifr_os_prop_test(200, prob = 0.5, phat = 0.3)
## Test Statistics
## --------------------------
## Sample Size 200
@@ -323,7 +329,7 @@
Using the treatment data, test equality of proportion of two treatments
# Using Variables
-infer_ts_prop_test(treatment, treatment1, treatment2, alternative = 'all')
+ifr_ts_prop_test(treatment, treatment1, treatment2, alternative = 'all')
## Test Statistics
## -----------------------------
## Total Observations 100
@@ -338,7 +344,7 @@
Using the treatment2 data, test whether outcome has same proportion for male and female
# Using Grouping Variable
-infer_ts_prop_group(treatment2, outcome, female, alternative = 'all')
+ifr_ts_prop_group(treatment2, outcome, female, alternative = 'all')
## Test Statistics
## -----------------------------
## Total Observations 200
@@ -353,7 +359,7 @@
Test whether the same proportion of people from two batches will pass a review exam for a training program. In the first batch of 30 participants, 30% passed the review, whereas in the second batch of 25 participants, 50% passed the review.
# Calculator
-infer_ts_prop_calc(n1 = 30, n2 = 25, p1 = 0.3, p2 = 0.5, alternative = 'all')
+ifr_ts_prop_calc(n1 = 30, n2 = 25, p1 = 0.3, p2 = 0.5, alternative = 'all')
## Test Statistics
## ------------------------------
## Total Observations 55
@@ -379,7 +385,7 @@
Using the mtcars data, compare the standard deviation of mpg to a hypothesized value.
+ifr_os_var_test(mtcars, mpg, 0.3, alternative = 'less')
## One-Sample Statistics
## -----------------------------------------------------------------------------
## Variable Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
@@ -400,7 +406,7 @@
## ----------------------------------------
+ifr_os_var_test(mtcars, mpg, 0.3, alternative = 'all')
## One-Sample Statistics
## -----------------------------------------------------------------------------
## Variable Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
@@ -428,7 +434,7 @@
Using the mtcars data, compare the standard deviation in miles per gallon for automatic and manual vehicles.
# Using Grouping Variable
-infer_ts_var_test(hsb, read, group_var = female, alternative = 'all')
+ifr_ts_var_test(hsb, read, group_var = female, alternative = 'all')
## Variance Ratio Test
## --------------------------------------------------
## Group Obs Mean Std. Err. Std. Dev.
@@ -461,7 +467,7 @@
Using the hsb data, compare the standard deviation of reading and writing scores.
+ifr_ts_var_test(hsb, read, write, alternative = 'all')
## Variance Ratio Test
## --------------------------------------------------
## Group Obs Mean Std. Err. Std. Dev.
@@ -500,7 +506,7 @@
Using the hsb data, test whether the proportion of females and males are equal.
+ifr_binom_test(hsb, female, prob = 0.5)
## Binomial Test
## ---------------------------------------
## Group N Obs. Prop Exp. Prop
@@ -522,7 +528,7 @@
Using Calculator
+ifr_binom_calc(32, 16, prob = 0.5)
## Binomial Test
## --------------------------------------
## Group N Obs. Prop Exp. Prop
@@ -551,7 +557,7 @@
Examples
Using the hsb data, test whether the mean of write differs between the three program types.
+ifr_oneway_anova(hsb, write, prog)
## ANOVA
## ----------------------------------------------------------------------
## Sum of
@@ -585,7 +591,7 @@
Using the hsb data, test whether the observed proportions for race differs significantly from the hypothesized proportions.
+ifr_chisq_gof_test(hsb, race, c(20, 20, 20 , 140))
## Test Statistics
## -----------------------
## Chi-Square 5.0286
@@ -607,7 +613,7 @@
Continuity Correction
+ifr_chisq_gof_test(hsb, race, c(20, 20, 20 , 140), correct = TRUE)
## Test Statistics
## -----------------------
## Chi-Square 4.3821
@@ -636,7 +642,7 @@
Examples
Using the hsb data, test if there is a relationship between the type of school attended (schtyp) and students’ gender (female).
+ifr_chisq_assoc_test(hsb, female, schtyp)
## Chi Square Statistics
##
## Statistics DF Value Prob
@@ -651,7 +657,7 @@
## ----------------------------------------------------
Using the hsb data, test if there is a relationship between the type of school attended (schtyp) and students’ socio economic status (ses).
+ifr_chisq_assoc_test(hsb, schtyp, ses)
## Chi Square Statistics
##
## Statistics DF Value Prob
@@ -677,7 +683,7 @@
Using the hsb data, test whether variance in reading score is same across race.
+ifr_levene_test(hsb, read, group_var = race)
## Summary Statistics
## Levels Frequency Mean Std. Dev
## -----------------------------------------
@@ -704,7 +710,7 @@
Using the hsb data, test whether variance is equal for reading, writing and social studies scores.
+ifr_levene_test(hsb, read, write, socst)
## Summary Statistics
## Levels Frequency Mean Std. Dev
## -----------------------------------------
@@ -735,7 +741,7 @@
Example
The exam data set contains scores of 15 students for three exams (exam1, exam2, exam3). Test if three exams are equally difficult.
+ifr_cochran_qtest(exam, exam1, exam2, exam3)
## Test Statistics
## ----------------------
## N 15
@@ -762,7 +768,7 @@
hb <- hsb
hb$himath <- ifelse(hsb$math > 60, 1, 0)
hb$hiread <- ifelse(hsb$read > 60, 1, 0)
-infer_mcnemar_test(hb, himath, hiread)
+ifr_mcnemar_test(hb, himath, hiread)
## Controls
## ---------------------------------
## Cases 0 1 Total
@@ -799,7 +805,7 @@
## Controls
## ---------------------------------
## Cases 0 1 Total
@@ -835,7 +841,7 @@
## ----------------------
Perform the above test using matrix as input.
+ifr_mcnemar_test(matrix(c(135, 18, 21, 26), nrow = 2))
## Controls
## ---------------------------------
## Cases 0 1 Total
@@ -881,7 +887,7 @@
We will use runs test to check regression residuals for serial correlation.
+ifr_runs_test(hsb, read)
## Runs Test
## Total Cases: 200
## Test Value : 50
@@ -894,7 +900,7 @@
## p-value: 0.3956945
+ifr_runs_test(hsb, read, drop = TRUE)
## Runs Test
## Total Cases: 200
## Test Value : 50
@@ -907,7 +913,7 @@
## p-value: 0.7307676
+ifr_runs_test(hsb, read, split = TRUE)
## Runs Test
## Total Cases: 200
## Test Value : 50
@@ -920,7 +926,7 @@
## p-value: 0.3956945
+ifr_runs_test(hsb, read, mean = TRUE)
## Runs Test
## Total Cases: 200
## Test Value : 52.23
@@ -933,7 +939,7 @@
## p-value: 0.4042329
# threshold to be used for counting runs
-infer_runs_test(hsb, read, threshold = 0)
+ifr_runs_test(hsb, read, threshold = 0)
## Runs Test
## Total Cases: 200
## Test Value : 0
diff --git a/docs/authors.html b/docs/authors.html
index a6796dd..276da5b 100644
--- a/docs/authors.html
+++ b/docs/authors.html
@@ -106,6 +106,12 @@
News
+
+
+ Blog
+
+
+ Online Courses
diff --git a/docs/index.html b/docs/index.html
index 04c795a..572cd4e 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -53,7 +53,7 @@
+
@@ -103,6 +103,12 @@
News
+
+
-
+ Blog
+
+
-
+ Online Courses
@@ -179,7 +185,7 @@
One Sample t Test
-infer_os_t_test(hsb, write, mu = 50, type = 'all')
+ifr_os_t_test(hsb, write, mu = 50, type = 'all')
#> One-Sample Statistics
#> ---------------------------------------------------------------------------------
#> Variable Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
@@ -202,7 +208,7 @@
ANOVA
-infer_oneway_anova(hsb, write, prog)
+ifr_oneway_anova(hsb, write, prog)
#> ANOVA
#> ----------------------------------------------------------------------
#> Sum of
@@ -229,7 +235,7 @@
Chi Square Test of Independence
-infer_chisq_assoc_test(hsb, female, schtyp)
+ifr_chisq_assoc_test(hsb, female, schtyp)
#> Chi Square Statistics
#>
#> Statistics DF Value Prob
@@ -247,7 +253,7 @@
Levene’s Test
-infer_levene_test(hsb, read, group_var = race)
+ifr_levene_test(hsb, read, group_var = race)
#> Summary Statistics
#> Levels Frequency Mean Std. Dev
#> -----------------------------------------
@@ -272,7 +278,7 @@
Cochran’s Q Test
-infer_cochran_qtest(exam, exam1, exam2, exam3)
+ifr_cochran_qtest(exam, exam1, exam2, exam3)
#> Test Statistics
#> ----------------------
#> N 15
@@ -288,7 +294,7 @@
hb <- hsb
hb$himath <- ifelse(hsb$math > 60, 1, 0)
hb$hiread <- ifelse(hsb$read > 60, 1, 0)
-infer_mcnemar_test(hb, himath, hiread)
+ifr_mcnemar_test(hb, himath, hiread)
#> Controls
#> ---------------------------------
#> Cases 0 1 Total
@@ -329,6 +335,11 @@
Getting Help
If you encounter a bug, please file a minimal reproducible example using reprex on github. For questions and clarifications, use StackOverflow.
+
+
+Code of Conduct
+
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
+
diff --git a/docs/news/index.html b/docs/news/index.html
index 1ff4c3a..cde572e 100644
--- a/docs/news/index.html
+++ b/docs/news/index.html
@@ -106,6 +106,12 @@
News
+
+
-
+ Blog
+
+-
+ Online Courses
This is a patch release to fix error on R-devel on Debian and Fedora.
diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml
index bbe3cf7..3fa3f85 100644
--- a/docs/pkgdown.yml
+++ b/docs/pkgdown.yml
@@ -3,7 +3,7 @@ pkgdown: 1.6.1
pkgdown_sha: ~
articles:
intro: intro.html
-last_built: 2021-05-28T14:34Z
+last_built: 2021-07-09T11:59Z
urls:
reference: https://inferr.rsquaredacademy.com/reference
article: https://inferr.rsquaredacademy.com/articles
diff --git a/docs/reference/exam.html b/docs/reference/exam.html
index 9b57c65..c841020 100644
--- a/docs/reference/exam.html
+++ b/docs/reference/exam.html
@@ -107,6 +107,12 @@
News
+
+
-
+ Blog
+
+-
+ Online Courses
diff --git a/docs/reference/hsb.html b/docs/reference/hsb.html
index 8a25f9e..d798659 100644
--- a/docs/reference/hsb.html
+++ b/docs/reference/hsb.html
@@ -108,6 +108,12 @@
News
+
+-
+ Blog
+
+-
+ Online Courses
diff --git a/docs/reference/ifr_binom_calc.html b/docs/reference/ifr_binom_calc.html
index 23d8e3c..2abdc0a 100644
--- a/docs/reference/ifr_binom_calc.html
+++ b/docs/reference/ifr_binom_calc.html
@@ -73,7 +73,7 @@
inferr
- 0.3.0.9000
+ 0.3.1.9000
@@ -108,6 +108,12 @@
News
+
+
-
+ Blog
+
+
-
+ Online Courses
@@ -175,8 +181,8 @@ Arg
Value
-
binom_test
returns an object of class "binom_test"
.
-An object of class "binom_test"
is a list containing the
+
ifr_binom_test
returns an object of class "ifr_binom_test"
.
+An object of class "ifr_binom_test"
is a list containing the
following components:
- exp_k
expected number of successes
- exp_p
expected probability of success
@@ -201,42 +207,44 @@ See a
Examples
- # using calculator
-ifr_binom_calc(32, 13, prob = 0.5)
-
#> Binomial Test
-#> --------------------------------------
-#> Group N Obs. Prop Exp. Prop
-#> --------------------------------------
-#> 0 19 0.59375 0.500
-#> 1 13 0.40625 0.500
-#> --------------------------------------
-#>
-#>
-#> Test Summary
-#> --------------------------------------------
-#> Tail Prob p-value
-#> --------------------------------------------
-#> Lower Pr(k <= 13) 0.188543
-#> Upper Pr(k >= 13) 0.892336
-#> --------------------------------------------
-# using data set
-ifr_binom_test(hsb, female, prob = 0.5)
-
#> Binomial Test
-#> ---------------------------------------
-#> Group N Obs. Prop Exp. Prop
-#> ---------------------------------------
-#> 0 91 0.455 0.500
-#> 1 109 0.545 0.500
-#> ---------------------------------------
-#>
-#>
-#> Test Summary
-#> ----------------------------------------------
-#> Tail Prob p-value
-#> ----------------------------------------------
-#> Lower Pr(k <= 109) 0.910518
-#> Upper Pr(k >= 109) 0.114623
-#> ----------------------------------------------
+ # using calculator
+ifr_binom_calc(32, 13, prob = 0.5)
+#> Binomial Test
+#> --------------------------------------
+#> Group N Obs. Prop Exp. Prop
+#> --------------------------------------
+#> 0 19 0.59375 0.500
+#> 1 13 0.40625 0.500
+#> --------------------------------------
+#>
+#>
+#> Test Summary
+#> --------------------------------------------
+#> Tail Prob p-value
+#> --------------------------------------------
+#> Lower Pr(k <= 13) 0.188543
+#> Upper Pr(k >= 13) 0.892336
+#> --------------------------------------------
+
+# using data set
+ifr_binom_test(hsb, female, prob = 0.5)
+#> Binomial Test
+#> ---------------------------------------
+#> Group N Obs. Prop Exp. Prop
+#> ---------------------------------------
+#> 0 91 0.455 0.500
+#> 1 109 0.545 0.500
+#> ---------------------------------------
+#>
+#>
+#> Test Summary
+#> ----------------------------------------------
+#> Tail Prob p-value
+#> ----------------------------------------------
+#> Lower Pr(k <= 109) 0.910518
+#> Upper Pr(k >= 109) 0.114623
+#> ----------------------------------------------
+
@@ -108,6 +108,12 @@
News
+
+
+ Blog
+
+
+ Online Courses
@@ -131,7 +137,7 @@
@@ -194,30 +200,32 @@
See a
Examples
- ifr_chisq_assoc_test(hsb, female, schtyp)
-
#> Chi Square Statistics
-#>
-#> Statistics DF Value Prob
-#> ----------------------------------------------------
-#> Chi-Square 1 0.0470 0.8284
-#> Likelihood Ratio Chi-Square 1 0.0471 0.8282
-#> Continuity Adj. Chi-Square 1 0.0005 0.9822
-#> Mantel-Haenszel Chi-Square 1 0.0468 0.8287
-#> Phi Coefficient 0.0153
-#> Contingency Coefficient 0.0153
-#> Cramer's V 0.0153
-#> ----------------------------------------------------
-ifr_chisq_assoc_test(hsb, female, ses)
-
#> Chi Square Statistics
-#>
-#> Statistics DF Value Prob
-#> ----------------------------------------------------
-#> Chi-Square 2 4.5765 0.1014
-#> Likelihood Ratio Chi-Square 2 4.6789 0.0964
-#> Phi Coefficient 0.1513
-#> Contingency Coefficient 0.1496
-#> Cramer's V 0.1513
-#> ----------------------------------------------------
+ ifr_chisq_assoc_test(hsb, female, schtyp)
+#> Chi Square Statistics
+#>
+#> Statistics DF Value Prob
+#> ----------------------------------------------------
+#> Chi-Square 1 0.0470 0.8284
+#> Likelihood Ratio Chi-Square 1 0.0471 0.8282
+#> Continuity Adj. Chi-Square 1 0.0005 0.9822
+#> Mantel-Haenszel Chi-Square 1 0.0468 0.8287
+#> Phi Coefficient 0.0153
+#> Contingency Coefficient 0.0153
+#> Cramer's V 0.0153
+#> ----------------------------------------------------
+
+ifr_chisq_assoc_test(hsb, female, ses)
+#> Chi Square Statistics
+#>
+#> Statistics DF Value Prob
+#> ----------------------------------------------------
+#> Chi-Square 2 4.5765 0.1014
+#> Likelihood Ratio Chi-Square 2 4.6789 0.0964
+#> Phi Coefficient 0.1513
+#> Contingency Coefficient 0.1496
+#> Cramer's V 0.1513
+#> ----------------------------------------------------
+
@@ -108,6 +108,12 @@
News
+
+
+ Blog
+
+
+ Online Courses
@@ -195,41 +201,43 @@ See a
Examples
- #> Test Statistics
-#> -----------------------
-#> Chi-Square 5.0286
-#> DF 3
-#> Pr > Chi Sq 0.1697
-#> Sample Size 200
-#>
-#> Variable: race
-#> -----------------------------------------------------------------
-#> Category Observed Expected % Deviation Std. Residuals
-#> -----------------------------------------------------------------
-#> 1 24 20 20.00 0.89
-#> 2 11 20 -45.00 -2.01
-#> 3 20 20 0.00 0.00
-#> 4 145 140 3.57 0.42
-#> -----------------------------------------------------------------
#> Test Statistics
-#> -----------------------
-#> Chi-Square 4.3821
-#> DF 3
-#> Pr > Chi Sq 0.2231
-#> Sample Size 200
-#>
-#> Variable: race
-#> -----------------------------------------------------------------
-#> Category Observed Expected % Deviation Std. Residuals
-#> -----------------------------------------------------------------
-#> 1 24 20 17.50 0.78
-#> 2 11 20 -47.50 -2.12
-#> 3 20 20 -2.50 -0.11
-#> 4 145 140 3.21 0.38
-#> -----------------------------------------------------------------
+ ifr_chisq_gof_test(hsb, race, c(20, 20, 20, 140))
+#> Test Statistics
+#> -----------------------
+#> Chi-Square 5.0286
+#> DF 3
+#> Pr > Chi Sq 0.1697
+#> Sample Size 200
+#>
+#> Variable: race
+#> -----------------------------------------------------------------
+#> Category Observed Expected % Deviation Std. Residuals
+#> -----------------------------------------------------------------
+#> 1 24 20 20.00 0.89
+#> 2 11 20 -45.00 -2.01
+#> 3 20 20 0.00 0.00
+#> 4 145 140 3.57 0.42
+#> -----------------------------------------------------------------
+
+# apply continuity correction
+ifr_chisq_gof_test(hsb, race, c(20, 20, 20, 140), correct = TRUE)
+#> Test Statistics
+#> -----------------------
+#> Chi-Square 4.3821
+#> DF 3
+#> Pr > Chi Sq 0.2231
+#> Sample Size 200
+#>
+#> Variable: race
+#> -----------------------------------------------------------------
+#> Category Observed Expected % Deviation Std. Residuals
+#> -----------------------------------------------------------------
+#> 1 24 20 17.50 0.78
+#> 2 11 20 -47.50 -2.12
+#> 3 20 20 -2.50 -0.11
+#> 4 145 140 3.21 0.38
+#> -----------------------------------------------------------------
+
@@ -108,6 +108,12 @@
News
+
+
+ Blog
+
+
+ Online Courses
@@ -177,14 +183,15 @@ R
Statistical Procedures, 4th edition. : Chapman & Hall/CRC.
Examples
- ifr_cochran_qtest(exam, exam1, exam2, exam3)
-
#> Test Statistics
-#> ----------------------
-#> N 15
-#> Cochran's Q 4.75
-#> df 2
-#> p value 0.093
-#> ----------------------
+ ifr_cochran_qtest(exam, exam1, exam2, exam3)
+#> Test Statistics
+#> ----------------------
+#> N 15
+#> Cochran's Q 4.75
+#> df 2
+#> p value 0.093
+#> ----------------------
+
@@ -107,6 +107,12 @@
News
+
+
+ Blog
+
+
+ Online Courses
@@ -143,10 +149,10 @@ Launch Shiny App
Examples
-
if (FALSE) {
-ifr_launch_shiny_app()
-}
-
+ if (FALSE) {
+ifr_launch_shiny_app()
+}
+
@@ -112,6 +112,12 @@
News
+
+
+ Blog
+
+
+ Online Courses
@@ -208,48 +214,50 @@ R
Carroll, R. J., and H. Schneider. 1985. A note on Levene’s tests for equality of variances. Statistics and Probability Letters 3: 191–194.
Examples
-
# using grouping variable
-ifr_levene_test(hsb, read, group_var = race)
-
#> Summary Statistics
-#> Levels Frequency Mean Std. Dev
-#> -----------------------------------------
-#> 1 24 46.67 10.24
-#> 2 11 51.91 7.66
-#> 3 20 46.8 7.12
-#> 4 145 53.92 10.28
-#> -----------------------------------------
-#> Total 200 52.23 10.25
-#> -----------------------------------------
-#>
-#> Test Statistics
-#> -------------------------------------------------------------------------
-#> Statistic Num DF Den DF F Pr > F
-#> -------------------------------------------------------------------------
-#> Brown and Forsythe 3 196 3.44 0.0179
-#> Levene 3 196 3.4792 0.017
-#> Brown and Forsythe (Trimmed Mean) 3 196 3.3936 0.019
-#> -------------------------------------------------------------------------
-# using variables
-ifr_levene_test(hsb, read, write, socst)
-
#> Summary Statistics
-#> Levels Frequency Mean Std. Dev
-#> -----------------------------------------
-#> 0 200 52.23 10.25
-#> 1 200 52.77 9.48
-#> 2 200 52.41 10.74
-#> -----------------------------------------
-#> Total 600 52.47 10.15
-#> -----------------------------------------
-#>
-#> Test Statistics
-#> -------------------------------------------------------------------------
-#> Statistic Num DF Den DF F Pr > F
-#> -------------------------------------------------------------------------
-#> Brown and Forsythe 2 597 1.1683 0.3116
-#> Levene 2 597 1.3803 0.2523
-#> Brown and Forsythe (Trimmed Mean) 2 597 1.3258 0.2664
-#> -------------------------------------------------------------------------
-
+ # using grouping variable
+ifr_levene_test(hsb, read, group_var = race)
+#> Summary Statistics
+#> Levels Frequency Mean Std. Dev
+#> -----------------------------------------
+#> 1 24 46.67 10.24
+#> 2 11 51.91 7.66
+#> 3 20 46.8 7.12
+#> 4 145 53.92 10.28
+#> -----------------------------------------
+#> Total 200 52.23 10.25
+#> -----------------------------------------
+#>
+#> Test Statistics
+#> -------------------------------------------------------------------------
+#> Statistic Num DF Den DF F Pr > F
+#> -------------------------------------------------------------------------
+#> Brown and Forsythe 3 196 3.44 0.0179
+#> Levene 3 196 3.4792 0.017
+#> Brown and Forsythe (Trimmed Mean) 3 196 3.3936 0.019
+#> -------------------------------------------------------------------------
+
+# using variables
+ifr_levene_test(hsb, read, write, socst)
+#> Summary Statistics
+#> Levels Frequency Mean Std. Dev
+#> -----------------------------------------
+#> 0 200 52.23 10.25
+#> 1 200 52.77 9.48
+#> 2 200 52.41 10.74
+#> -----------------------------------------
+#> Total 600 52.47 10.15
+#> -----------------------------------------
+#>
+#> Test Statistics
+#> -------------------------------------------------------------------------
+#> Statistic Num DF Den DF F Pr > F
+#> -------------------------------------------------------------------------
+#> Brown and Forsythe 2 597 1.1683 0.3116
+#> Levene 2 597 1.3803 0.2523
+#> Brown and Forsythe (Trimmed Mean) 2 597 1.3258 0.2664
+#> -------------------------------------------------------------------------
+
+
@@ -108,6 +108,12 @@
News
+
+
+ Blog
+
+
+ Online Courses
@@ -195,116 +201,119 @@ See a
Examples
- #> Controls
-#> ---------------------------------
-#> Cases 0 1 Total
-#> ---------------------------------
-#> 0 135 21 156
-#> 1 18 26 44
-#> ---------------------------------
-#> Total 153 47 200
-#> ---------------------------------
-#>
-#> McNemar's Test
-#> ----------------------------
-#> McNemar's chi2 0.2308
-#> DF 1
-#> Pr > chi2 0.631
-#> Exact Pr >= chi2 0.7493
-#> ----------------------------
-#>
-#> Kappa Coefficient
-#> --------------------------------
-#> Kappa 0.4454
-#> ASE 0.075
-#> 95% Lower Conf Limit 0.2984
-#> 95% Upper Conf Limit 0.5923
-#> --------------------------------
-#>
-#> Proportion With Factor
-#> ----------------------
-#> cases 0.78
-#> controls 0.765
-#> ratio 1.0196
-#> odds ratio 1.1667
-#> ----------------------
#> Controls
-#> ---------------------------------
-#> Cases 0 1 Total
-#> ---------------------------------
-#> 0 135 21 156
-#> 1 18 26 44
-#> ---------------------------------
-#> Total 153 47 200
-#> ---------------------------------
-#>
-#> McNemar's Test
-#> ----------------------------
-#> McNemar's chi2 0.2308
-#> DF 1
-#> Pr > chi2 0.631
-#> Exact Pr >= chi2 0.7493
-#> ----------------------------
-#>
-#> Kappa Coefficient
-#> --------------------------------
-#> Kappa 0.4454
-#> ASE 0.075
-#> 95% Lower Conf Limit 0.2984
-#> 95% Upper Conf Limit 0.5923
-#> --------------------------------
-#>
-#> Proportion With Factor
-#> ----------------------
-#> cases 0.78
-#> controls 0.765
-#> ratio 1.0196
-#> odds ratio 1.1667
-#> ----------------------
#> Controls
-#> ---------------------------------
-#> Cases 0 1 Total
-#> ---------------------------------
-#> 0 135 21 156
-#> 1 18 26 44
-#> ---------------------------------
-#> Total 153 47 200
-#> ---------------------------------
-#>
-#> McNemar's Test
-#> ----------------------------
-#> McNemar's chi2 0.2308
-#> DF 1
-#> Pr > chi2 0.631
-#> Exact Pr >= chi2 0.7493
-#> ----------------------------
-#>
-#> Kappa Coefficient
-#> --------------------------------
-#> Kappa 0.4454
-#> ASE 0.075
-#> 95% Lower Conf Limit 0.2984
-#> 95% Upper Conf Limit 0.5923
-#> --------------------------------
-#>
-#> Proportion With Factor
-#> ----------------------
-#> cases 0.78
-#> controls 0.765
-#> ratio 1.0196
-#> odds ratio 1.1667
-#> ----------------------
+ # using variables from data
+hb <- hsb
+hb$himath <- ifelse(hsb$math > 60, 1, 0)
+hb$hiread <- ifelse(hsb$read > 60, 1, 0)
+ifr_mcnemar_test(hb, himath, hiread)
+#> Controls
+#> ---------------------------------
+#> Cases 0 1 Total
+#> ---------------------------------
+#> 0 135 21 156
+#> 1 18 26 44
+#> ---------------------------------
+#> Total 153 47 200
+#> ---------------------------------
+#>
+#> McNemar's Test
+#> ----------------------------
+#> McNemar's chi2 0.2308
+#> DF 1
+#> Pr > chi2 0.631
+#> Exact Pr >= chi2 0.7493
+#> ----------------------------
+#>
+#> Kappa Coefficient
+#> --------------------------------
+#> Kappa 0.4454
+#> ASE 0.075
+#> 95% Lower Conf Limit 0.2984
+#> 95% Upper Conf Limit 0.5923
+#> --------------------------------
+#>
+#> Proportion With Factor
+#> ----------------------
+#> cases 0.78
+#> controls 0.765
+#> ratio 1.0196
+#> odds ratio 1.1667
+#> ----------------------
+
+# test if the proportion of students in himath and hiread group is same
+himath <- ifelse(hsb$math > 60, 1, 0)
+hiread <- ifelse(hsb$read > 60, 1, 0)
+ifr_mcnemar_test(table(himath, hiread))
+#> Controls
+#> ---------------------------------
+#> Cases 0 1 Total
+#> ---------------------------------
+#> 0 135 21 156
+#> 1 18 26 44
+#> ---------------------------------
+#> Total 153 47 200
+#> ---------------------------------
+#>
+#> McNemar's Test
+#> ----------------------------
+#> McNemar's chi2 0.2308
+#> DF 1
+#> Pr > chi2 0.631
+#> Exact Pr >= chi2 0.7493
+#> ----------------------------
+#>
+#> Kappa Coefficient
+#> --------------------------------
+#> Kappa 0.4454
+#> ASE 0.075
+#> 95% Lower Conf Limit 0.2984
+#> 95% Upper Conf Limit 0.5923
+#> --------------------------------
+#>
+#> Proportion With Factor
+#> ----------------------
+#> cases 0.78
+#> controls 0.765
+#> ratio 1.0196
+#> odds ratio 1.1667
+#> ----------------------
+
+# using matrix
+ifr_mcnemar_test(matrix(c(135, 18, 21, 26), nrow = 2))
+#> Controls
+#> ---------------------------------
+#> Cases 0 1 Total
+#> ---------------------------------
+#> 0 135 21 156
+#> 1 18 26 44
+#> ---------------------------------
+#> Total 153 47 200
+#> ---------------------------------
+#>
+#> McNemar's Test
+#> ----------------------------
+#> McNemar's chi2 0.2308
+#> DF 1
+#> Pr > chi2 0.631
+#> Exact Pr >= chi2 0.7493
+#> ----------------------------
+#>
+#> Kappa Coefficient
+#> --------------------------------
+#> Kappa 0.4454
+#> ASE 0.075
+#> 95% Lower Conf Limit 0.2984
+#> 95% Upper Conf Limit 0.5923
+#> --------------------------------
+#>
+#> Proportion With Factor
+#> ----------------------
+#> cases 0.78
+#> controls 0.765
+#> ratio 1.0196
+#> odds ratio 1.1667
+#> ----------------------
+
@@ -107,6 +107,12 @@
News
+
+
+ Blog
+
+
+ Online Courses
@@ -191,51 +197,53 @@ See a
Examples
- ifr_oneway_anova(mtcars, mpg, cyl)
-
#> ANOVA
-#> --------------------------------------------------------------------
-#> Sum of
-#> Squares DF Mean Square F Sig.
-#> --------------------------------------------------------------------
-#> Between Groups 824.785 2 412.392 39.699 0
-#> Within Groups 301.263 29 10.388
-#> Total 1126.048 31
-#> --------------------------------------------------------------------
-#>
-#> Report
-#> ----------------------------------------
-#> Category N Mean Std. Dev.
-#> ----------------------------------------
-#> 4 11 26.664 4.510
-#> 6 7 19.743 1.454
-#> 8 14 15.100 2.560
-#> ----------------------------------------
-#>
-#> Number of obs = 32 R-squared = 0.7325
-#> Root MSE = 3.2231 Adj R-squared = 0.714
-#>
ifr_oneway_anova(hsb, write, prog)
-
#> ANOVA
-#> ----------------------------------------------------------------------
-#> Sum of
-#> Squares DF Mean Square F Sig.
-#> ----------------------------------------------------------------------
-#> Between Groups 3175.698 2 1587.849 21.275 0
-#> Within Groups 14703.177 197 74.635
-#> Total 17878.875 199
-#> ----------------------------------------------------------------------
-#>
-#> Report
-#> -----------------------------------------
-#> Category N Mean Std. Dev.
-#> -----------------------------------------
-#> 1 45 51.333 9.398
-#> 2 105 56.257 7.943
-#> 3 50 46.760 9.319
-#> -----------------------------------------
-#>
-#> Number of obs = 200 R-squared = 0.1776
-#> Root MSE = 8.6392 Adj R-squared = 0.1693
-#>
+ ifr_oneway_anova(mtcars, mpg, cyl)
+#> ANOVA
+#> --------------------------------------------------------------------
+#> Sum of
+#> Squares DF Mean Square F Sig.
+#> --------------------------------------------------------------------
+#> Between Groups 824.785 2 412.392 39.699 0
+#> Within Groups 301.263 29 10.388
+#> Total 1126.048 31
+#> --------------------------------------------------------------------
+#>
+#> Report
+#> ----------------------------------------
+#> Category N Mean Std. Dev.
+#> ----------------------------------------
+#> 4 11 26.664 4.510
+#> 6 7 19.743 1.454
+#> 8 14 15.100 2.560
+#> ----------------------------------------
+#>
+#> Number of obs = 32 R-squared = 0.7325
+#> Root MSE = 3.2231 Adj R-squared = 0.714
+#>
+ifr_oneway_anova(hsb, write, prog)
+#> ANOVA
+#> ----------------------------------------------------------------------
+#> Sum of
+#> Squares DF Mean Square F Sig.
+#> ----------------------------------------------------------------------
+#> Between Groups 3175.698 2 1587.849 21.275 0
+#> Within Groups 14703.177 197 74.635
+#> Total 17878.875 199
+#> ----------------------------------------------------------------------
+#>
+#> Report
+#> -----------------------------------------
+#> Category N Mean Std. Dev.
+#> -----------------------------------------
+#> 1 45 51.333 9.398
+#> 2 105 56.257 7.943
+#> 3 50 46.760 9.319
+#> -----------------------------------------
+#>
+#> Number of obs = 200 R-squared = 0.1776
+#> Root MSE = 8.6392 Adj R-squared = 0.1693
+#>
+
@@ -108,6 +108,12 @@
News
+
+
+ Blog
+
+
+ Online Courses
@@ -214,38 +220,40 @@ See a
Examples
- # use as a calculator
-ifr_os_prop_test(200, prob = 0.5, phat = 0.3)
-
#> Test Statistics
-#> --------------------------
-#> Sample Size 200
-#> Exp Prop 0.5
-#> Obs Prop 0.3
-#> z -5.6569
-#> Pr(|Z| > |z|) 0
-#>
-#> -----------------------------------------------------------------
-#> Category Observed Expected % Deviation Std. Residuals
-#> -----------------------------------------------------------------
-#> 0 140 100 40.00 4.00
-#> 1 60 100 -40.00 -4.00
-#> -----------------------------------------------------------------
-# using data set
-ifr_os_prop_test(hsb, female, prob = 0.5)
-
#> Test Statistics
-#> -------------------------
-#> Sample Size 200
-#> Exp Prop 0.5
-#> Obs Prop 0.545
-#> z 1.2728
-#> Pr(|Z| > |z|) 0.2031
-#>
-#> -----------------------------------------------------------------
-#> Category Observed Expected % Deviation Std. Residuals
-#> -----------------------------------------------------------------
-#> 0 91 100 -9.00 -0.90
-#> 1 109 100 9.00 0.90
-#> -----------------------------------------------------------------
+ # use as a calculator
+ifr_os_prop_test(200, prob = 0.5, phat = 0.3)
+#> Test Statistics
+#> --------------------------
+#> Sample Size 200
+#> Exp Prop 0.5
+#> Obs Prop 0.3
+#> z -5.6569
+#> Pr(|Z| > |z|) 0
+#>
+#> -----------------------------------------------------------------
+#> Category Observed Expected % Deviation Std. Residuals
+#> -----------------------------------------------------------------
+#> 0 140 100 40.00 4.00
+#> 1 60 100 -40.00 -4.00
+#> -----------------------------------------------------------------
+
+# using data set
+ifr_os_prop_test(hsb, female, prob = 0.5)
+#> Test Statistics
+#> -------------------------
+#> Sample Size 200
+#> Exp Prop 0.5
+#> Obs Prop 0.545
+#> z 1.2728
+#> Pr(|Z| > |z|) 0.2031
+#>
+#> -----------------------------------------------------------------
+#> Category Observed Expected % Deviation Std. Residuals
+#> -----------------------------------------------------------------
+#> 0 91 100 -9.00 -0.90
+#> 1 109 100 9.00 0.90
+#> -----------------------------------------------------------------
+
@@ -108,6 +108,12 @@
News
+
+
+ Blog
+
+
+ Online Courses
@@ -217,77 +223,82 @@ See a
Examples
- # lower tail
-ifr_os_t_test(hsb, write, mu = 50, alternative = 'less')
-
#> One-Sample Statistics
-#> ---------------------------------------------------------------------------------
-#> Variable Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
-#> ---------------------------------------------------------------------------------
-#> write 200 52.775 0.6702 9.4786 -Inf 53.8828
-#> ---------------------------------------------------------------------------------
-#>
-#> Lower Tail Test
-#> ---------------
-#>
-#> Ho: mean(write) >=50
-#> Ha: mean(write) <50
-#> --------------------------------------------------------------------------------
-#> Variable t DF Sig Mean Diff. [95% Conf. Interval]
-#> --------------------------------------------------------------------------------
-#> write 4.141 199 0.99997 2.775 -Inf 3.8828
-#> --------------------------------------------------------------------------------
-# upper tail
-ifr_os_t_test(hsb, write, mu = 50, alternative = 'greater')
-
#> One-Sample Statistics
-#> ---------------------------------------------------------------------------------
-#> Variable Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
-#> ---------------------------------------------------------------------------------
-#> write 200 52.775 0.6702 9.4786 51.6678 Inf
-#> ---------------------------------------------------------------------------------
-#>
-#> Upper Tail Test
-#> ---------------
-#>
-#> Ho: mean(write) <=50
-#> Ha: mean(write) >50
-#> --------------------------------------------------------------------------------
-#> Variable t DF Sig Mean Diff. [95% Conf. Interval]
-#> --------------------------------------------------------------------------------
-#> write 4.141 199 0.99997 2.775 1.6678 Inf
-#> --------------------------------------------------------------------------------
-# both tails
-ifr_os_t_test(hsb, write, mu = 50, alternative = 'both')
-
#> One-Sample Statistics
-#> ---------------------------------------------------------------------------------
-#> Variable Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
-#> ---------------------------------------------------------------------------------
-#> write 200 52.775 0.6702 9.4786 51.4537 54.0969
-#> ---------------------------------------------------------------------------------
-#>
-#> Two Tail Test
-#> ---------------
-#>
-#> Ho: mean(write) ~=50
-#> Ha: mean(write) !=50
-#> --------------------------------------------------------------------------------
-#> Variable t DF Sig Mean Diff. [95% Conf. Interval]
-#> --------------------------------------------------------------------------------
-#> write 4.141 199 0.99997 2.775 1.4537 4.0969
-#> --------------------------------------------------------------------------------
-# all tails
-ifr_os_t_test(hsb, write, mu = 50, alternative = 'all')
-
#> One-Sample Statistics
-#> ---------------------------------------------------------------------------------
-#> Variable Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
-#> ---------------------------------------------------------------------------------
-#> write 200 52.775 0.6702 9.4786 51.4537 54.0969
-#> ---------------------------------------------------------------------------------
-#>
-#> Ho: mean(write) ~=50
-#>
-#> Ha: mean < 50 Ha: mean ~= 50 Ha: mean > 50
-#> t = 4.141 t = 4.141 t = 4.141
-#> P < t = 1.0000 P > |t| = 0.0001 P > t = 0.0000
+ # lower tail
+ifr_os_t_test(hsb, write, mu = 50, alternative = 'less')
+#> One-Sample Statistics
+#> ---------------------------------------------------------------------------------
+#> Variable Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
+#> ---------------------------------------------------------------------------------
+#> write 200 52.775 0.6702 9.4786 -Inf 53.8828
+#> ---------------------------------------------------------------------------------
+#>
+#> Lower Tail Test
+#> ---------------
+#>
+#> Ho: mean(write) >=50
+#> Ha: mean(write) <50
+#> --------------------------------------------------------------------------------
+#> Variable t DF Sig Mean Diff. [95% Conf. Interval]
+#> --------------------------------------------------------------------------------
+#> write 4.141 199 0.99997 2.775 -Inf 3.8828
+#> --------------------------------------------------------------------------------
+
+# upper tail
+ifr_os_t_test(hsb, write, mu = 50, alternative = 'greater')
+#> One-Sample Statistics
+#> ---------------------------------------------------------------------------------
+#> Variable Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
+#> ---------------------------------------------------------------------------------
+#> write 200 52.775 0.6702 9.4786 51.6678 Inf
+#> ---------------------------------------------------------------------------------
+#>
+#> Upper Tail Test
+#> ---------------
+#>
+#> Ho: mean(write) <=50
+#> Ha: mean(write) >50
+#> --------------------------------------------------------------------------------
+#> Variable t DF Sig Mean Diff. [95% Conf. Interval]
+#> --------------------------------------------------------------------------------
+#> write 4.141 199 0.00003 2.775 1.6678 Inf
+#> --------------------------------------------------------------------------------
+
+# both tails
+ifr_os_t_test(hsb, write, mu = 50, alternative = 'both')
+#> One-Sample Statistics
+#> ---------------------------------------------------------------------------------
+#> Variable Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
+#> ---------------------------------------------------------------------------------
+#> write 200 52.775 0.6702 9.4786 51.4537 54.0969
+#> ---------------------------------------------------------------------------------
+#>
+#> Two Tail Test
+#> ---------------
+#>
+#> Ho: mean(write) ~=50
+#> Ha: mean(write) !=50
+#> --------------------------------------------------------------------------------
+#> Variable t DF Sig Mean Diff. [95% Conf. Interval]
+#> --------------------------------------------------------------------------------
+#> write 4.141 199 0.00005 2.775 1.4537 4.0969
+#> --------------------------------------------------------------------------------
+
+# all tails
+ifr_os_t_test(hsb, write, mu = 50, alternative = 'all')
+#> One-Sample Statistics
+#> ---------------------------------------------------------------------------------
+#> Variable Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
+#> ---------------------------------------------------------------------------------
+#> write 200 52.775 0.6702 9.4786 51.4537 54.0969
+#> ---------------------------------------------------------------------------------
+#>
+#> Ho: mean(write) ~=50
+#>
+#> Ha: mean < 50 Ha: mean ~= 50 Ha: mean > 50
+#> t = 4.141 t = 4.141 t = 4.141
+#> P < t = 0.99997 P > |t| = 0.00005 P > t = 0.00003
+
+
@@ -109,6 +109,12 @@
News
+
+
+ Blog
+
+
+ Online Courses
@@ -217,80 +223,84 @@ See a
Examples
- # lower tail
-ifr_os_var_test(mtcars, mpg, 5, alternative = 'less')
-
#> One-Sample Statistics
-#> -----------------------------------------------------------------------------
-#> Variable Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
-#> -----------------------------------------------------------------------------
-#> mpg 32 20.0906 1.0654 6.0269 3.8737 10.6527
-#> -----------------------------------------------------------------------------
-#>
-#> Lower Tail Test
-#> ---------------
-#> Ho: sd(mpg) >= 5
-#> Ha: sd(mpg) < 5
-#>
-#> Chi-Square Test for Variance
-#> -------------------------------------
-#> Variable c DF Sig
-#> -------------------------------------
-#> mpg 45.042 31 0.9506
-#> -------------------------------------
-# upper tail
-ifr_os_var_test(mtcars, mpg, 5, alternative = 'greater')
-
#> One-Sample Statistics
-#> -----------------------------------------------------------------------------
-#> Variable Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
-#> -----------------------------------------------------------------------------
-#> mpg 32 20.0906 1.0654 6.0269 3.8737 10.6527
-#> -----------------------------------------------------------------------------
-#>
-#> Upper Tail Test
-#> ---------------
-#> Ho: sd(mpg) <= 5
-#> Ha: sd(mpg) > 5
-#>
-#> Chi-Square Test for Variance
-#> -------------------------------------
-#> Variable c DF Sig
-#> -------------------------------------
-#> mpg 45.042 31 0.0494
-#> -------------------------------------
-# both tails
-ifr_os_var_test(mtcars, mpg, 5, alternative = 'both')
-
#> One-Sample Statistics
-#> -----------------------------------------------------------------------------
-#> Variable Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
-#> -----------------------------------------------------------------------------
-#> mpg 32 20.0906 1.0654 6.0269 3.8737 10.6527
-#> -----------------------------------------------------------------------------
-#>
-#> Two Tail Test
-#> ---------------
-#> Ho: sd(mpg) = 5
-#> Ha: sd(mpg) != 5
-#>
-#> Chi-Square Test for Variance
-#> -------------------------------------
-#> Variable c DF Sig
-#> -------------------------------------
-#> mpg 45.042 31 0.0988
-#> -------------------------------------
-# all tails
-ifr_os_var_test(mtcars, mpg, 5, alternative = 'all')
-
#> One-Sample Statistics
-#> -----------------------------------------------------------------------------
-#> Variable Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
-#> -----------------------------------------------------------------------------
-#> mpg 32 20.0906 1.0654 6.0269 3.8737 10.6527
-#> -----------------------------------------------------------------------------
-#>
-#> Ho: sd(mpg) = 5
-#>
-#> Ha: sd < 5 Ha: sd != 5 Ha: sd > 5
-#> c = 45.0419 c = 45.0419 c = 45.0419
-#> Pr(C < c) = 0.9506 2 * Pr(C > c) = 0.0988 Pr(C > c) = 0.0494
+ # lower tail
+ifr_os_var_test(mtcars, mpg, 5, alternative = 'less')
+#> One-Sample Statistics
+#> -----------------------------------------------------------------------------
+#> Variable Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
+#> -----------------------------------------------------------------------------
+#> mpg 32 20.0906 1.0654 6.0269 3.8737 10.6527
+#> -----------------------------------------------------------------------------
+#>
+#> Lower Tail Test
+#> ---------------
+#> Ho: sd(mpg) >= 5
+#> Ha: sd(mpg) < 5
+#>
+#> Chi-Square Test for Variance
+#> -------------------------------------
+#> Variable c DF Sig
+#> -------------------------------------
+#> mpg 45.042 31 0.9506
+#> -------------------------------------
+
+# upper tail
+ifr_os_var_test(mtcars, mpg, 5, alternative = 'greater')
+#> One-Sample Statistics
+#> -----------------------------------------------------------------------------
+#> Variable Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
+#> -----------------------------------------------------------------------------
+#> mpg 32 20.0906 1.0654 6.0269 3.8737 10.6527
+#> -----------------------------------------------------------------------------
+#>
+#> Upper Tail Test
+#> ---------------
+#> Ho: sd(mpg) <= 5
+#> Ha: sd(mpg) > 5
+#>
+#> Chi-Square Test for Variance
+#> -------------------------------------
+#> Variable c DF Sig
+#> -------------------------------------
+#> mpg 45.042 31 0.0494
+#> -------------------------------------
+
+# both tails
+ifr_os_var_test(mtcars, mpg, 5, alternative = 'both')
+#> One-Sample Statistics
+#> -----------------------------------------------------------------------------
+#> Variable Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
+#> -----------------------------------------------------------------------------
+#> mpg 32 20.0906 1.0654 6.0269 3.8737 10.6527
+#> -----------------------------------------------------------------------------
+#>
+#> Two Tail Test
+#> ---------------
+#> Ho: sd(mpg) = 5
+#> Ha: sd(mpg) != 5
+#>
+#> Chi-Square Test for Variance
+#> -------------------------------------
+#> Variable c DF Sig
+#> -------------------------------------
+#> mpg 45.042 31 0.0988
+#> -------------------------------------
+
+# all tails
+ifr_os_var_test(mtcars, mpg, 5, alternative = 'all')
+#> One-Sample Statistics
+#> -----------------------------------------------------------------------------
+#> Variable Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
+#> -----------------------------------------------------------------------------
+#> mpg 32 20.0906 1.0654 6.0269 3.8737 10.6527
+#> -----------------------------------------------------------------------------
+#>
+#> Ho: sd(mpg) = 5
+#>
+#> Ha: sd < 5 Ha: sd != 5 Ha: sd > 5
+#> c = 45.0419 c = 45.0419 c = 45.0419
+#> Pr(C < c) = 0.9506 2 * Pr(C > c) = 0.0988 Pr(C > c) = 0.0494
+
@@ -111,6 +111,12 @@
News
+
+
+ Blog
+
+
+ Online Courses
@@ -214,62 +220,67 @@ R
Swed, F. S., and C. Eisenhart. 1943. Tables for testing randomness of grouping in a sequence of alternatives. Annals of Mathematical Statistics 14: 66–87.
Examples
-
ifr_runs_test(hsb, read)
-
#> Runs Test
-#> Total Cases: 200
-#> Test Value : 50
-#> Cases < Test Value: 101
-#> Cases > Test Value: 99
-#> Number of Runs: 95
-#> Expected Runs: 100.99
-#> Variance (Runs): 49.73874
-#> z Statistic: -0.8493358
-#> p-value: 0.3956945
-ifr_runs_test(hsb, read, drop = TRUE)
-
#> Runs Test
-#> Total Cases: 200
-#> Test Value : 50
-#> Cases < Test Value: 83
-#> Cases > Test Value: 99
-#> Number of Runs: 89
-#> Expected Runs: 91.2967
-#> Variance (Runs): 44.54805
-#> z Statistic: -0.3441046
-#> p-value: 0.7307676
-ifr_runs_test(hsb, read, split = TRUE)
-
#> Runs Test
-#> Total Cases: 200
-#> Test Value : 50
-#> Cases < Test Value: 101
-#> Cases > Test Value: 99
-#> Number of Runs: 95
-#> Expected Runs: 100.99
-#> Variance (Runs): 49.73874
-#> z Statistic: -0.8493358
-#> p-value: 0.3956945
-ifr_runs_test(hsb, read, mean = TRUE)
-
#> Runs Test
-#> Total Cases: 200
-#> Test Value : 52.23
-#> Cases < Test Value: 115
-#> Cases > Test Value: 85
-#> Number of Runs: 93
-#> Expected Runs: 98.75
-#> Variance (Runs): 47.52418
-#> z Statistic: -0.8340854
-#> p-value: 0.4042329
-ifr_runs_test(hsb, read, threshold = 0)
-
#> Runs Test
-#> Total Cases: 200
-#> Test Value : 0
-#> Cases < Test Value: 0
-#> Cases > Test Value: 200
-#> Number of Runs: 1
-#> Expected Runs: 1
-#> Variance (Runs): 0
-#> z Statistic: NaN
-#> p-value: NaN
-
+ ifr_runs_test(hsb, read)
+#> Runs Test
+#> Total Cases: 200
+#> Test Value : 50
+#> Cases < Test Value: 101
+#> Cases > Test Value: 99
+#> Number of Runs: 95
+#> Expected Runs: 100.99
+#> Variance (Runs): 49.73874
+#> z Statistic: -0.8493358
+#> p-value: 0.3956945
+
+ifr_runs_test(hsb, read, drop = TRUE)
+#> Runs Test
+#> Total Cases: 200
+#> Test Value : 50
+#> Cases < Test Value: 83
+#> Cases > Test Value: 99
+#> Number of Runs: 89
+#> Expected Runs: 91.2967
+#> Variance (Runs): 44.54805
+#> z Statistic: -0.3441046
+#> p-value: 0.7307676
+
+ifr_runs_test(hsb, read, split = TRUE)
+#> Runs Test
+#> Total Cases: 200
+#> Test Value : 50
+#> Cases < Test Value: 101
+#> Cases > Test Value: 99
+#> Number of Runs: 95
+#> Expected Runs: 100.99
+#> Variance (Runs): 49.73874
+#> z Statistic: -0.8493358
+#> p-value: 0.3956945
+
+ifr_runs_test(hsb, read, mean = TRUE)
+#> Runs Test
+#> Total Cases: 200
+#> Test Value : 52.23
+#> Cases < Test Value: 115
+#> Cases > Test Value: 85
+#> Number of Runs: 93
+#> Expected Runs: 98.75
+#> Variance (Runs): 47.52418
+#> z Statistic: -0.8340854
+#> p-value: 0.4042329
+
+ifr_runs_test(hsb, read, threshold = 0)
+#> Runs Test
+#> Total Cases: 200
+#> Test Value : 0
+#> Cases < Test Value: 0
+#> Cases > Test Value: 200
+#> Number of Runs: 1
+#> Expected Runs: 1
+#> Variance (Runs): 0
+#> z Statistic: NaN
+#> p-value: NaN
+
+
@@ -108,6 +108,12 @@
News
+
+
+ Blog
+
+
+ Online Courses
@@ -231,143 +237,147 @@ See a
Examples
- # lower tail
-ifr_ts_ind_ttest(hsb, female, write, alternative = 'less')
-
#> Group Statistics
-#> -----------------------------------------------------------------------------
-#> Group Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
-#> -----------------------------------------------------------------------------
-#> 0 91 50.121 1.080 10.305 47.97539 52.26661
-#> 1 109 54.991 0.779 8.134 53.44689 56.53511
-#> -----------------------------------------------------------------------------
-#> combined 200 52.775 0.67 9.479 51.45379 54.09621
-#> -----------------------------------------------------------------------------
-#> diff 200 -4.87 1.304 9.231 -7.42623 -2.31377
-#> -----------------------------------------------------------------------------
-#>
-#> Independent Samples Test
-#> ------------------------
-#>
-#> Ho: mean(0) - mean(1) = diff = 0
-#> Ha: diff < 0
-#>
-#> ---------------------------------------------------------------------
-#> Variable Method Variances DF t Value P < t
-#> ---------------------------------------------------------------------
-#> write Pooled Equal 198 -3.7341 0.0001
-#> write Satterthwaite Unequal 170 -3.6564 0.0002
-#> ---------------------------------------------------------------------
-#>
-#> Test for Equality of Variances
-#> ---------------------------------------------------------------
-#> Variable Method Num DF Den DF F Value P > F
-#> ---------------------------------------------------------------
-#> write Folded F 90 108 1.605 0.0188
-#> ---------------------------------------------------------------
-# upper tail
-ifr_ts_ind_ttest(hsb, female, write, alternative = 'greater')
-
#> Group Statistics
-#> -----------------------------------------------------------------------------
-#> Group Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
-#> -----------------------------------------------------------------------------
-#> 0 91 50.121 1.080 10.305 47.97539 52.26661
-#> 1 109 54.991 0.779 8.134 53.44689 56.53511
-#> -----------------------------------------------------------------------------
-#> combined 200 52.775 0.67 9.479 51.45379 54.09621
-#> -----------------------------------------------------------------------------
-#> diff 200 -4.87 1.304 9.231 -7.42623 -2.31377
-#> -----------------------------------------------------------------------------
-#>
-#> Independent Samples Test
-#> ------------------------
-#>
-#> Ho: mean(0) - mean(1) = diff = 0
-#> Ha: diff > 0
-#>
-#> ---------------------------------------------------------------------
-#> Variable Method Variances DF t Value P > t
-#> ---------------------------------------------------------------------
-#> write Pooled Equal 198 -3.7341 0.9999
-#> write Satterthwaite Unequal 170 -3.6564 0.9998
-#> ---------------------------------------------------------------------
-#>
-#> Test for Equality of Variances
-#> ---------------------------------------------------------------
-#> Variable Method Num DF Den DF F Value P > F
-#> ---------------------------------------------------------------
-#> write Folded F 90 108 1.605 0.0188
-#> ---------------------------------------------------------------
-# both tails
-ifr_ts_ind_ttest(hsb, female, write, alternative = 'both')
-
#> Group Statistics
-#> -----------------------------------------------------------------------------
-#> Group Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
-#> -----------------------------------------------------------------------------
-#> 0 91 50.121 1.080 10.305 47.97539 52.26661
-#> 1 109 54.991 0.779 8.134 53.44689 56.53511
-#> -----------------------------------------------------------------------------
-#> combined 200 52.775 0.67 9.479 51.45379 54.09621
-#> -----------------------------------------------------------------------------
-#> diff 200 -4.87 1.304 9.231 -7.42623 -2.31377
-#> -----------------------------------------------------------------------------
-#>
-#> Independent Samples Test
-#> ------------------------
-#>
-#> Ho: mean(0) - mean(1) = diff = 0
-#> Ha: diff ~= 0
-#>
-#> ---------------------------------------------------------------------
-#> Variable Method Variances DF t Value P > |t|
-#> ---------------------------------------------------------------------
-#> write Pooled Equal 198 -3.7341 0.0002
-#> write Satterthwaite Unequal 170 -3.6564 0.0003
-#> ---------------------------------------------------------------------
-#>
-#> Test for Equality of Variances
-#> ---------------------------------------------------------------
-#> Variable Method Num DF Den DF F Value P > F
-#> ---------------------------------------------------------------
-#> write Folded F 90 108 1.605 0.0188
-#> ---------------------------------------------------------------
-# all tails
-ifr_ts_ind_ttest(hsb, female, write, alternative = 'all')
-
#> Group Statistics
-#> -----------------------------------------------------------------------------
-#> Group Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
-#> -----------------------------------------------------------------------------
-#> 0 91 50.121 1.080 10.305 47.97539 52.26661
-#> 1 109 54.991 0.779 8.134 53.44689 56.53511
-#> -----------------------------------------------------------------------------
-#> combined 200 52.775 0.67 9.479 51.45379 54.09621
-#> -----------------------------------------------------------------------------
-#> diff 200 -4.87 1.304 9.231 -7.42623 -2.31377
-#> -----------------------------------------------------------------------------
-#>
-#> Independent Samples Test
-#> ------------------------
-#>
-#> Ho: mean(0) - mean(1) = diff = 0
-#>
-#> Ha: diff < 0 Ha: diff ~= 0 Ha: diff > 0
-#>
-#> Pooled
-#> ------------------------------------------------------------------------
-#> t = -3.7341 t = -3.7341 t = -3.7341
-#> P < t = 0.0001 P > |t| = 0.0002 P > t = 0.9999
-#>
-#> Satterthwaite
-#> ------------------------------------------------------------------------
-#> t = -3.6564 t = -3.6564 t = -3.6564
-#> P < t = 0.0002 P > |t| = 0.0003 P > t = 0.9998
-#>
-#>
-#> Test for Equality of Variances
-#> ---------------------------------------------------------------
-#> Variable Method Num DF Den DF F Value P > F
-#> ---------------------------------------------------------------
-#> write Folded F 90 108 1.605 0.0188
-#> ---------------------------------------------------------------
+ # lower tail
+ifr_ts_ind_ttest(hsb, female, write, alternative = 'less')
+#> Group Statistics
+#> -----------------------------------------------------------------------------
+#> Group Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
+#> -----------------------------------------------------------------------------
+#> 0 91 50.121 1.080 10.305 47.97539 52.26661
+#> 1 109 54.991 0.779 8.134 53.44689 56.53511
+#> -----------------------------------------------------------------------------
+#> combined 200 52.775 0.67 9.479 51.45379 54.09621
+#> -----------------------------------------------------------------------------
+#> diff 200 -4.87 1.304 9.231 -7.42623 -2.31377
+#> -----------------------------------------------------------------------------
+#>
+#> Independent Samples Test
+#> ------------------------
+#>
+#> Ho: mean(0) - mean(1) = diff = 0
+#> Ha: diff < 0
+#>
+#> ---------------------------------------------------------------------
+#> Variable Method Variances DF t Value P < t
+#> ---------------------------------------------------------------------
+#> write Pooled Equal 198 -3.7341 0.0001
+#> write Satterthwaite Unequal 170 -3.6564 0.0002
+#> ---------------------------------------------------------------------
+#>
+#> Test for Equality of Variances
+#> ---------------------------------------------------------------
+#> Variable Method Num DF Den DF F Value P > F
+#> ---------------------------------------------------------------
+#> write Folded F 90 108 1.605 0.0188
+#> ---------------------------------------------------------------
+
+# upper tail
+ifr_ts_ind_ttest(hsb, female, write, alternative = 'greater')
+#> Group Statistics
+#> -----------------------------------------------------------------------------
+#> Group Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
+#> -----------------------------------------------------------------------------
+#> 0 91 50.121 1.080 10.305 47.97539 52.26661
+#> 1 109 54.991 0.779 8.134 53.44689 56.53511
+#> -----------------------------------------------------------------------------
+#> combined 200 52.775 0.67 9.479 51.45379 54.09621
+#> -----------------------------------------------------------------------------
+#> diff 200 -4.87 1.304 9.231 -7.42623 -2.31377
+#> -----------------------------------------------------------------------------
+#>
+#> Independent Samples Test
+#> ------------------------
+#>
+#> Ho: mean(0) - mean(1) = diff = 0
+#> Ha: diff > 0
+#>
+#> ---------------------------------------------------------------------
+#> Variable Method Variances DF t Value P > t
+#> ---------------------------------------------------------------------
+#> write Pooled Equal 198 -3.7341 0.9999
+#> write Satterthwaite Unequal 170 -3.6564 0.9998
+#> ---------------------------------------------------------------------
+#>
+#> Test for Equality of Variances
+#> ---------------------------------------------------------------
+#> Variable Method Num DF Den DF F Value P > F
+#> ---------------------------------------------------------------
+#> write Folded F 90 108 1.605 0.0188
+#> ---------------------------------------------------------------
+
+# both tails
+ifr_ts_ind_ttest(hsb, female, write, alternative = 'both')
+#> Group Statistics
+#> -----------------------------------------------------------------------------
+#> Group Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
+#> -----------------------------------------------------------------------------
+#> 0 91 50.121 1.080 10.305 47.97539 52.26661
+#> 1 109 54.991 0.779 8.134 53.44689 56.53511
+#> -----------------------------------------------------------------------------
+#> combined 200 52.775 0.67 9.479 51.45379 54.09621
+#> -----------------------------------------------------------------------------
+#> diff 200 -4.87 1.304 9.231 -7.42623 -2.31377
+#> -----------------------------------------------------------------------------
+#>
+#> Independent Samples Test
+#> ------------------------
+#>
+#> Ho: mean(0) - mean(1) = diff = 0
+#> Ha: diff ~= 0
+#>
+#> ---------------------------------------------------------------------
+#> Variable Method Variances DF t Value P > |t|
+#> ---------------------------------------------------------------------
+#> write Pooled Equal 198 -3.7341 0.0002
+#> write Satterthwaite Unequal 170 -3.6564 0.0003
+#> ---------------------------------------------------------------------
+#>
+#> Test for Equality of Variances
+#> ---------------------------------------------------------------
+#> Variable Method Num DF Den DF F Value P > F
+#> ---------------------------------------------------------------
+#> write Folded F 90 108 1.605 0.0188
+#> ---------------------------------------------------------------
+
+# all tails
+ifr_ts_ind_ttest(hsb, female, write, alternative = 'all')
+#> Group Statistics
+#> -----------------------------------------------------------------------------
+#> Group Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
+#> -----------------------------------------------------------------------------
+#> 0 91 50.121 1.080 10.305 47.97539 52.26661
+#> 1 109 54.991 0.779 8.134 53.44689 56.53511
+#> -----------------------------------------------------------------------------
+#> combined 200 52.775 0.67 9.479 51.45379 54.09621
+#> -----------------------------------------------------------------------------
+#> diff 200 -4.87 1.304 9.231 -7.42623 -2.31377
+#> -----------------------------------------------------------------------------
+#>
+#> Independent Samples Test
+#> ------------------------
+#>
+#> Ho: mean(0) - mean(1) = diff = 0
+#>
+#> Ha: diff < 0 Ha: diff ~= 0 Ha: diff > 0
+#>
+#> Pooled
+#> ------------------------------------------------------------------------
+#> t = -3.7341 t = -3.7341 t = -3.7341
+#> P < t = 0.0001 P > |t| = 0.0002 P > t = 0.9999
+#>
+#> Satterthwaite
+#> ------------------------------------------------------------------------
+#> t = -3.6564 t = -3.6564 t = -3.6564
+#> P < t = 0.0002 P > |t| = 0.0003 P > t = 0.9998
+#>
+#>
+#> Test for Equality of Variances
+#> ---------------------------------------------------------------
+#> Variable Method Num DF Den DF F Value P > F
+#> ---------------------------------------------------------------
+#> write Folded F 90 108 1.605 0.0188
+#> ---------------------------------------------------------------
+
@@ -108,6 +108,12 @@
News
+
+
+ Blog
+
+
+ Online Courses
@@ -214,113 +220,117 @@ See a
Examples
- # lower tail
-ifr_ts_paired_ttest(hsb, read, write, alternative = 'less')
-
#> Paired Samples Statistics
-#> ----------------------------------------------------------------------------
-#> Variables Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
-#> ----------------------------------------------------------------------------
-#> read 200 52.23 0.7249921 10.25294 50.8 53.66
-#> write 200 52.775 0.6702372 9.478586 51.45 54.1
-#> ----------------------------------------------------------------------------
-#> diff 200 -0.545 0.6283822 8.886666 -1.78 0.69
-#> ----------------------------------------------------------------------------
-#>
-#> Paired Samples Correlations
-#> -------------------------------------------
-#> Variables Obs Correlation Sig.
-#> read & write 200 0.60 0
-#> -------------------------------------------
-#>
-#> Paired Samples Test
-#> -------------------
-#> Ho: mean(read - write) = 0
-#> Ha: mean(read - write) < 0
-#>
-#> ----------------------------------------
-#> Variables t df Sig.
-#> ----------------------------------------
-#> read - write -0.8673 199 0.193
-#> ----------------------------------------
-# upper tail
-ifr_ts_paired_ttest(hsb, read, write, alternative = 'greater')
-
#> Paired Samples Statistics
-#> ----------------------------------------------------------------------------
-#> Variables Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
-#> ----------------------------------------------------------------------------
-#> read 200 52.23 0.7249921 10.25294 50.8 53.66
-#> write 200 52.775 0.6702372 9.478586 51.45 54.1
-#> ----------------------------------------------------------------------------
-#> diff 200 -0.545 0.6283822 8.886666 -1.78 0.69
-#> ----------------------------------------------------------------------------
-#>
-#> Paired Samples Correlations
-#> -------------------------------------------
-#> Variables Obs Correlation Sig.
-#> read & write 200 0.60 0
-#> -------------------------------------------
-#>
-#> Paired Samples Test
-#> -------------------
-#> Ho: mean(read - write) = 0
-#> Ha: mean(read - write) > 0
-#>
-#> ----------------------------------------
-#> Variables t df Sig.
-#> ----------------------------------------
-#> read - write -0.8673 199 0.807
-#> ----------------------------------------
-# both tails
-ifr_ts_paired_ttest(hsb, read, write, alternative = 'both')
-
#> Paired Samples Statistics
-#> ----------------------------------------------------------------------------
-#> Variables Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
-#> ----------------------------------------------------------------------------
-#> read 200 52.23 0.7249921 10.25294 50.8 53.66
-#> write 200 52.775 0.6702372 9.478586 51.45 54.1
-#> ----------------------------------------------------------------------------
-#> diff 200 -0.545 0.6283822 8.886666 -1.78 0.69
-#> ----------------------------------------------------------------------------
-#>
-#> Paired Samples Correlations
-#> -------------------------------------------
-#> Variables Obs Correlation Sig.
-#> read & write 200 0.60 0
-#> -------------------------------------------
-#>
-#> Paired Samples Test
-#> -------------------
-#> Ho: mean(read - write) = 0
-#> Ha: mean(read - write) ~= 0
-#>
-#> ----------------------------------------
-#> Variables t df Sig.
-#> ----------------------------------------
-#> read - write -0.8673 199 0.387
-#> ----------------------------------------
-# all tails
-ifr_ts_paired_ttest(hsb, read, write, alternative = 'all')
-
#> Paired Samples Statistics
-#> ----------------------------------------------------------------------------
-#> Variables Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
-#> ----------------------------------------------------------------------------
-#> read 200 52.23 0.7249921 10.25294 50.8 53.66
-#> write 200 52.775 0.6702372 9.478586 51.45 54.1
-#> ----------------------------------------------------------------------------
-#> diff 200 -0.545 0.6283822 8.886666 -1.78 0.69
-#> ----------------------------------------------------------------------------
-#>
-#> Paired Samples Correlations
-#> -------------------------------------------
-#> Variables Obs Correlation Sig.
-#> read & write 200 0.60 0
-#> -------------------------------------------
-#>
-#> Ho: mean(read - write) = mean(diff) = 0
-#>
-#> Ha: mean(diff) < 0 Ha: mean(diff) ~= 0 Ha: mean(diff) > 0
-#> t = -0.8673 t = -0.8673 t = -0.8673
-#> P < t = 0.193 P > |t| = 0.387 P > t = 0.807
+ # lower tail
+ifr_ts_paired_ttest(hsb, read, write, alternative = 'less')
+#> Paired Samples Statistics
+#> ----------------------------------------------------------------------------
+#> Variables Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
+#> ----------------------------------------------------------------------------
+#> read 200 52.23 0.7249921 10.25294 50.8 53.66
+#> write 200 52.775 0.6702372 9.478586 51.45 54.1
+#> ----------------------------------------------------------------------------
+#> diff 200 -0.545 0.6283822 8.886666 -1.78 0.69
+#> ----------------------------------------------------------------------------
+#>
+#> Paired Samples Correlations
+#> -------------------------------------------
+#> Variables Obs Correlation Sig.
+#> read & write 200 0.60 0
+#> -------------------------------------------
+#>
+#> Paired Samples Test
+#> -------------------
+#> Ho: mean(read - write) = 0
+#> Ha: mean(read - write) < 0
+#>
+#> ----------------------------------------
+#> Variables t df Sig.
+#> ----------------------------------------
+#> read - write -0.8673 199 0.193
+#> ----------------------------------------
+
+# upper tail
+ifr_ts_paired_ttest(hsb, read, write, alternative = 'greater')
+#> Paired Samples Statistics
+#> ----------------------------------------------------------------------------
+#> Variables Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
+#> ----------------------------------------------------------------------------
+#> read 200 52.23 0.7249921 10.25294 50.8 53.66
+#> write 200 52.775 0.6702372 9.478586 51.45 54.1
+#> ----------------------------------------------------------------------------
+#> diff 200 -0.545 0.6283822 8.886666 -1.78 0.69
+#> ----------------------------------------------------------------------------
+#>
+#> Paired Samples Correlations
+#> -------------------------------------------
+#> Variables Obs Correlation Sig.
+#> read & write 200 0.60 0
+#> -------------------------------------------
+#>
+#> Paired Samples Test
+#> -------------------
+#> Ho: mean(read - write) = 0
+#> Ha: mean(read - write) > 0
+#>
+#> ----------------------------------------
+#> Variables t df Sig.
+#> ----------------------------------------
+#> read - write -0.8673 199 0.807
+#> ----------------------------------------
+
+# both tails
+ifr_ts_paired_ttest(hsb, read, write, alternative = 'both')
+#> Paired Samples Statistics
+#> ----------------------------------------------------------------------------
+#> Variables Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
+#> ----------------------------------------------------------------------------
+#> read 200 52.23 0.7249921 10.25294 50.8 53.66
+#> write 200 52.775 0.6702372 9.478586 51.45 54.1
+#> ----------------------------------------------------------------------------
+#> diff 200 -0.545 0.6283822 8.886666 -1.78 0.69
+#> ----------------------------------------------------------------------------
+#>
+#> Paired Samples Correlations
+#> -------------------------------------------
+#> Variables Obs Correlation Sig.
+#> read & write 200 0.60 0
+#> -------------------------------------------
+#>
+#> Paired Samples Test
+#> -------------------
+#> Ho: mean(read - write) = 0
+#> Ha: mean(read - write) ~= 0
+#>
+#> ----------------------------------------
+#> Variables t df Sig.
+#> ----------------------------------------
+#> read - write -0.8673 199 0.387
+#> ----------------------------------------
+
+# all tails
+ifr_ts_paired_ttest(hsb, read, write, alternative = 'all')
+#> Paired Samples Statistics
+#> ----------------------------------------------------------------------------
+#> Variables Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
+#> ----------------------------------------------------------------------------
+#> read 200 52.23 0.7249921 10.25294 50.8 53.66
+#> write 200 52.775 0.6702372 9.478586 51.45 54.1
+#> ----------------------------------------------------------------------------
+#> diff 200 -0.545 0.6283822 8.886666 -1.78 0.69
+#> ----------------------------------------------------------------------------
+#>
+#> Paired Samples Correlations
+#> -------------------------------------------
+#> Variables Obs Correlation Sig.
+#> read & write 200 0.60 0
+#> -------------------------------------------
+#>
+#> Ho: mean(read - write) = mean(diff) = 0
+#>
+#> Ha: mean(diff) < 0 Ha: mean(diff) ~= 0 Ha: mean(diff) > 0
+#> t = -0.8673 t = -0.8673 t = -0.8673
+#> P < t = 0.193 P > |t| = 0.387 P > t = 0.807
+
@@ -109,6 +109,12 @@
News
+
+
+ Blog
+
+
+ Online Courses
+
+
+ Blog
+
+
+ Online Courses
@@ -207,55 +213,57 @@ See a
Examples
- # using grouping variable
-ifr_ts_var_test(hsb, read, group_var = female, alternative = 'less')
-
#> Variance Ratio Test
-#> --------------------------------------------------
-#> Group Obs Mean Std. Err. Std. Dev.
-#> --------------------------------------------------
-#> 0 91 52.82 1.1 10.51
-#> 1 109 51.73 0.96 10.06
-#> --------------------------------------------------
-#> combined 200 52.23 0.72 10.25
-#> --------------------------------------------------
-#>
-#> Lower Tail Test
-#> ---------------
-#> ratio = sd(0) / (1)
-#> Ho: ratio = 1
-#> Ha: ratio < 1
-#>
-#> Variance Ratio Test
-#> ------------------------------------
-#> F Num DF Den DF p
-#> ------------------------------------
-#> 1.0913 90 108 0.6694
-#> ------------------------------------
-# using two variables
-ifr_ts_var_test(hsb, read, write, alternative = 'less')
-
#> Variance Ratio Test
-#> --------------------------------------------------
-#> Group Obs Mean Std. Err. Std. Dev.
-#> --------------------------------------------------
-#> read 200 52.23 0.72 10.25
-#> write 200 52.77 0.67 9.48
-#> --------------------------------------------------
-#> combined 400 52.5 0.49 9.86
-#> --------------------------------------------------
-#>
-#> Lower Tail Test
-#> ---------------
-#> ratio = sd(read) / (write)
-#> Ho: ratio = 1
-#> Ha: ratio < 1
-#>
-#> Variance Ratio Test
-#> ------------------------------------
-#> F Num DF Den DF p
-#> ------------------------------------
-#> 1.1701 199 199 0.8656
-#> ------------------------------------
-
+ # using grouping variable
+ifr_ts_var_test(hsb, read, group_var = female, alternative = 'less')
+#> Variance Ratio Test
+#> --------------------------------------------------
+#> Group Obs Mean Std. Err. Std. Dev.
+#> --------------------------------------------------
+#> 0 91 52.82 1.1 10.51
+#> 1 109 51.73 0.96 10.06
+#> --------------------------------------------------
+#> combined 200 52.23 0.72 10.25
+#> --------------------------------------------------
+#>
+#> Lower Tail Test
+#> ---------------
+#> ratio = sd(0) / (1)
+#> Ho: ratio = 1
+#> Ha: ratio < 1
+#>
+#> Variance Ratio Test
+#> ------------------------------------
+#> F Num DF Den DF p
+#> ------------------------------------
+#> 1.0913 90 108 0.6694
+#> ------------------------------------
+
+# using two variables
+ifr_ts_var_test(hsb, read, write, alternative = 'less')
+#> Variance Ratio Test
+#> --------------------------------------------------
+#> Group Obs Mean Std. Err. Std. Dev.
+#> --------------------------------------------------
+#> read 200 52.23 0.72 10.25
+#> write 200 52.77 0.67 9.48
+#> --------------------------------------------------
+#> combined 400 52.5 0.49 9.86
+#> --------------------------------------------------
+#>
+#> Lower Tail Test
+#> ---------------
+#> ratio = sd(read) / (write)
+#> Ho: ratio = 1
+#> Ha: ratio < 1
+#>
+#> Variance Ratio Test
+#> ------------------------------------
+#> F Num DF Den DF p
+#> ------------------------------------
+#> 1.1701 199 199 0.8656
+#> ------------------------------------
+
+