Package 'ABACUS'

Title: Apps Based Activities for Communicating and Understanding Statistics
Description: A set of Shiny apps for effective communication and understanding in statistics. The current version includes properties of normal distribution, properties of sampling distribution, one-sample z and t tests, two samples independent (unpaired) t test and analysis of variance.
Authors: Mintu Nath [aut, cre]
Maintainer: Mintu Nath <[email protected]>
License: GPL-3
Version: 1.0.0
Built: 2024-07-03 06:51:56 UTC
Source: CRAN

Help Index


Apps Based Activities for Communicating and Understanding Statistics

Description

Using Shiny-based apps, ABACUS demonstrates different statistical concepts on sampling and hypothesis testing within a browser environment. It integrates the simulation approach with the graphical presentation to present different statistical tools. The user can alter Simulation Feature, Population Parameters, Sample Characteristics and Distribution Function to explore the influence of these changes on sampling and hypothesis testing.

Details

Package: ABACUS
Type: Package
Version: 1.0.0
Date: 2019-07-31
License: GPL-3

ABACUS uses simulation to explore the statistical principles. There is no need to upload any data. The order of ABACUS functions that can be included in a classroom environment are: shiny_dnorm, shiny_sampling, shiny_onesampz, shiny_onesampt, shiny_dnorm_dt, shiny_twosampt and shiny_anova.

Note

https://shiny.abdn.ac.uk/Stats/apps/

Author(s)

Mintu Nath<[email protected]>

See Also

shiny_dnorm, shiny_sampling, shiny_onesampz, shiny_onesampt, shiny_twosampt and shiny_anova


Shiny App to Demonstrate Analysis of Variance

Description

An interactive Shiny app to demonstrate Analysis of Variance.

Usage

shiny_anova()

Details

The interactive Shiny app demonstrates the principles of Analysis of Variance. The true parameter values are provided by the user. The user changes sample characteristics, distribution function and simulation features and explores the influence of these changes on the hypothesis testing using principles of analysis of variance.

The left panel includes the user inputs for Simulation Features, Population Parameters, Sample Characteristics, and Distribution Function. To use the app at first instance, just click the Update button. To alter the input values, edit the text box or move the point on the slider and explore the changes in different tabs (see below).

To obtain identical outcomes in a separate run of the app, set a common seed value at the bottom of the left panel and click Update. All subsequent updates will produce identical results provided other inputs are identical. The seed value is ignored when the option check the box to update instantly is selected.

Value

The outcomes are presented in several tabs.

Population

contains the density plots of three populations and rug plots of the sample units randomly drawn from these populations. It also shows the population parameter values chosen by the user.

Sample

contains the dot plots and box plots of three samples drawn randomly from the three populations and rug plots of the sample units. It also includes the estimates of mean and standard deviation of three samples.

SS & MS

contains the bar plots showing the between and within sum of squares (SS) and mean squares (MS) as well as the proportion of between and within SS over total SS.

Test Statistic

contains the plots showing the mean difference between groups. and corresponding 95% confidence intervals (CI). The tab also contains the distribution of the test statistic F, the observed value of the test statistic and probabilities under the given value of the Type 1 error

Summary

includes the summary of the sampled data and outcomes from the one-way analysis of variance. Different sections are: (1) Hypothesis, highlighting the null and alternative hypothesis; (2) Sample, tabulating the full sampled data; (3) Summary Statistics, summarising the summary information of three samples; (4) Model Outputs, the outputs from fitting the analysis of variance model. The section also present the multiple comparision of means using Tukey's Honest Significant Differences test. This section represents standard R outputs based on fitting an lm function.

Note

https://shiny.abdn.ac.uk/Stats/apps/

Author(s)

Mintu Nath

See Also

Function in base R for normal distribution, F distribution and fitting linear model including dnorm, pnorm, qnorm, rnorm, df, pf, qf, rf, lm, aov, anova.lm, summary.lm summary.aov, model.tables

Examples

if(interactive()){
    library(ggplot2)
    library(shiny)
    library(ABACUS)
    # Run shiny app
    shiny_anova()
}

Shiny App to Explore Properties of the Normal Distribution

Description

An interactive Shiny app to demonstrate properties of the Normal distribution.

Usage

shiny_dnorm()

Details

The interactive Shiny app demonstrates the properties of Normal distribution. The app considers parameters (mean and standard deviation) of the Normal distribution and captures its properties using different graphical outputs. The user changes the population parameter values, sample characteristics, distribution function and simulation features and explores the influence of these changes on the hypothesis testing.

The left panel includes the user inputs for Simulation Features, Population Parameters, Sample Characteristics, and Distribution Function. To use the app at first instance, just click the Update button. To alter the input values, edit the text box or move the point on the slider and explore the changes in different tabs (see below).

To obtain identical outcomes in a separate run of the app, set a common seed value at the bottom of the left panel and click Update. All subsequent updates will produce identical results provided other inputs are identical. The seed value is ignored when the option check the box to update instantly is selected.

Value

The outcomes are presented in several tabs.

Sample

contains the histogram of sampling units randomly drawn from the given population. Increasing the sample size and the number of bins creates the shape of the Normal distribution. It also creates the normal density plot based on empirical data and theoretical normal distribution given the parameter values

Distribution

contains the plot for the probability density function of the Normal distribution with given parameter values. The user can also explore centring and scaling effect on the probability density function.

Probability & Quantile

contains the plots for the probability density function and cumulative probability density function. The user can explore the relationship between the cumulative probability and quantile corresponding to tails of the distribution.

Note

https://shiny.abdn.ac.uk/Stats/apps/

Author(s)

Mintu Nath

See Also

Function in base R for normal distribution including dnorm, pnorm, qnorm, rnorm.

Function in base R for normal distribution, including dnorm, pnorm, qnorm, rnorm

Examples

if(interactive()){
    library(ggplot2)
    library(shiny)
    library(ABACUS)
    # Run shiny app
    shiny_dnorm()
}

Shiny App to Explore Properties of Normal and Student's t Distributions

Description

An interactive Shiny app to demonstrate Normal and Student's t distributions.

Usage

shiny_dnorm_dt()

Details

The interactive Shiny app demonstrates the properties of Normal and Student's t distributions. The app considers parameters (mean and standard deviation) of the standard Normal distribution along with Student's t distribution given degrees of freedom.

The left panel includes the user inputs for Parameters of standard Normal distribution (mean = 0, sd = 1) and Student's t distribution (degrees of freedom), and Probability with options to change cumulative probability and tails of probability. To alter the input values, move the point on the slider for the degrees of freedom of t distribution and explore the changes in different tabs (see below).

Value

The outcomes are presented in two tabs.

Probability Density Function

displays the probability density function of the standard Normal distribution (red) and t distribution (blue).

Distribution & Probability

contains the plot for the probablity density function of the standard Normal distribution and Student's t distribution with given degrees of freedom.

Note

https://shiny.abdn.ac.uk/Stats/apps/

Author(s)

Mintu Nath

See Also

Function in base R for normal distribution, including dnorm, pnorm, qnorm, rnorm dt, pt qt, rt

Examples

if(interactive()){
    library(ggplot2)
    library(shiny)
    library(ABACUS)
    # Run shiny app
    shiny_dnorm_dt()
}

Shiny App to Demonstrate One-Sample Student's t-Test

Description

An interactive Shiny app to demonstrate one-sample Student's t-test.

Usage

shiny_onesampt()

Details

The interactive Shiny app demonstrates the principles of the hypothesis testing of means in a one-sample design where the population variance is unknown. The true population parameters are provided by the user. The user changes the hypothesised population mean and other features and explores how Student's t-test compares the hypothesised mean with the mean of the sample randomly drawn from the population.

The left panel includes the user inputs for Simulation Features, Population Parameters, Sample Characteristics, and Distribution Function. To use the app at first instance, just click the Update button. To alter the input values, edit the text box or move the point on the slider and explore the changes in different tabs (see below).

To obtain identical outcomes in a separate run of the app, set a common seed value at the bottom of the left panel and click Update. All subsequent updates will produce identical results provided other inputs are identical. The seed value is ignored when the option check the box to update instantly is selected.

Value

The outcomes are presented in several tabs.

Population

contains the density plots of the population and rug plots of the sample units randomly drawn from the population. It also includes the population parameter values chosen by the user.

Sample

contains the dot plot and box plot of the sample drawn randomly from the population and rug plot of the sample units. It also includes the mean and standard deviation of the random sample.

Test Statistic

presents the plot showing the mean difference between the sample mean and hypothesised mean and corresponding 95% confidence intervals (CI). The tab also contains the distribution of the test statistic t with the observed value of the test statistic and probabilities under the given value of the Type 1 error

Summary

includes the summary of the sampled data and outcomes from the one-sample Student's t-test. Different sections are: (1) Hypothesis, highlighting the null and alternative hypothesis; (2) Sample, tabulating the full sampled data; (3) Summary Statistics, summarising the summary information of the sample; (4) Test Statistic, presenting the outputs from the one-sample Student's t-test. (5) Confidence Interval, highlighting the mean difference and corresponding 95% confidence intervals (CI).

Note

https://shiny.abdn.ac.uk/Stats/apps/

Author(s)

Mintu Nath

See Also

Function in base R for normal distribution and t distribution including dnorm, pnorm, qnorm, rnorm, dt, pt, qt, rt The app shiny_onesampz performs the hypothesis testing of mean when the population variance is unknown.

Examples

if(interactive()){
    library(ggplot2)
    library(shiny)
    library(ABACUS)
    # Run shiny app
    shiny_onesampt()
}

Shiny App to Demonstrate One-Sample Z-Test

Description

An interactive Shiny app to demonstrate one-sample Z-test.

Usage

shiny_onesampz()

Details

The interactive Shiny app demonstrates the principles of the hypothesis testing of means in a one-sample design where the population variance is known. The true population parameters are provided by the user. The user changes the hypothesised population mean and other features and explores how the Z-test compares the hypothesised mean with the mean of the sample randomly drawn from the population.

The left panel includes the user inputs for Simulation Features, Population Parameters, Sample Characteristics, and Distribution Function. To use the app at first instance, just click the Update button. To alter the input values, edit the text box or move the point on the slider and explore the changes in different tabs (see below).

To obtain identical outcomes in a separate run of the app, set a common seed value at the bottom of the left panel and click Update. All subsequent updates will produce identical results provided other inputs are identical. The seed value is ignored when the option check the box to update instantly is selected.

Value

The outcomes are presented in several tabs.

Population

contains the density plots of the population and rug plots of the sample units randomly drawn from the population. It also includes the population parameter values chosen by the user.

Sample

contains the dot plot and box plot of the sample drawn randomly from the population and rug plot of the sample units. It also includes the mean and standard deviation of the random sample.

Test Statistic

contains the plot showing the mean difference between the sample mean and hypothesised mean and corresponding 95% confidence intervals (CI). The tab also contains the distribution of the test statistic t with the observed value of the test statistic and probabilities under the given value of the Type 1 error

Summary

includes the summary of the sampled data and outcomes from the one-sample Z-test. Different sections are: (1) Hypothesis, highlighting the null and alternative hypothesis; (2) Sample, tabulating the full sampled data; (3) Summary Statistics, summarising the summary information of the sample; (4) Test Statistic, presenting the outputs from the one-sample Z-test. (5) Confidence Interval, highlighting the mean difference and corresponding 95% confidence intervals (CI).

Note

https://shiny.abdn.ac.uk/Stats/apps/

Author(s)

Mintu Nath

See Also

Function in base R for normal distribution including dnorm, pnorm, qnorm, rnorm. The app shiny_onesampt performs the hypothesis testing of mean when the population variance is known.

Examples

if(interactive()){
    library(ggplot2)
    library(shiny)
    library(ABACUS)
    # Run shiny app
    shiny_onesampz()
}

Shiny App to Explore Properties of Sampling Distributions

Description

An interactive Shiny app to demonstrate properties of the sampling distributions.

Usage

shiny_sampling()

Details

The interactive Shiny app demonstrates the properties of the sampling distribution. The true population parameter values of the Normal distribution are provided by the user. The user draws many samples from the population with the given sample characteristics and explore the variability of sample means. The app also includes the construction of 95% confidence interval for all samples. Altering the population and sample characteristics, the user can explore the influence of these changes on the sampling distribution.

The left panel includes the user inputs for Simulation Features, Population Parameters, Sample Characteristics and Distribution Function. To use the app at first instance, just click the Update button. To alter the input values, edit the text box or move the point on the slider and explores the changes in different tabs (see below).

To obtain identical outcomes in a separate run of the app, set a common seed value at the bottom of the left panel and click Update. All subsequent updates will produce identical results provided other inputs are identical. The seed value is ignored when the option check the box to update instantly is selected.

Value

The outcomes are presented in several tabs.

Population & Sample

contains the density plots of the population and dot plot of the sample units for the first sample randomly drawn from the population. It also includes the population parameter values are chosen by the user as well as estimates of sample mean and standard deviation based on the first sample.

Sampling Distribution

contains a panel of 8 dot plots based on the sample drawn randomly from the population with given parameters. Each plot depicts the mean and standard deviation of the random sample.

Sample Estimators

contains the histogram of the observed sample means and the empirical distribution of sample means. It also includes the rug plot of all sample means.

Confidence Interval

contains the plot showing the 95% confidence intervals (CI) of all samples. The plot shows the true population mean as a red horizontal line. It also provides the exact number of these estimated CI that include the true population mean.

Summary

includes the summary of the sampled data and outcomes from the one-sample z-test. Different sections are: (1) Sample, tabulating the full sampled data; (2) Sample Distribution, highlighting the expection of sample mean and sample standard deviation as well as standard error of mean; (3) Confidence Interval, showing the concept of 95% confidence intervals (CI) of mean.

Note

https://shiny.abdn.ac.uk/Stats/apps/

Also note that under the central limit theorem, the distribution of the sample means will follow normal distribution whatever the distribution of the variable in the population.

Author(s)

Mintu Nath

See Also

Function in base R for normal distribution including dnorm, pnorm, qnorm, rnorm, sample.

Examples

if(interactive()){
    library(ggplot2)
    library(shiny)
    library(ABACUS)
    # Run shiny app
    shiny_sampling()
}

Shiny App to Demonstrate Two-Sample Independent (Unpaired) Student's t-Test

Description

An interactive Shiny app to demonstrate two-sample independent (unpaired) Student's t-test.

Usage

shiny_twosampt()

Details

The interactive Shiny app demonstrates the principles of the hypothesis testing of means in a two-sample independent (unpaired) design where the population variances are equal but unknown. The true parameter values are provided by the user. The user changes sample characteristics, distribution function and simulation features and explores the influence of these changes on the hypothesis testing using Student's t-test.

The left panel includes the user inputs for Simulation Features, Population Parameters, Sample Characteristics, and Distribution Function. To use the app at first instance, just click the Update button. To alter the input values, edit the text box or move the point on the slider and explore the changes in different tabs (see below).

To obtain identical outcomes in a separate run of the app, set a common seed value at the bottom of the left panel and click Update. All subsequent updates will produce identical results provided other inputs are identical. The seed value is ignored when the option check the box to update instantly is selected.

Value

The outcomes are presented in several tabs.

Population

contains the density plots of two populations and rug plots of the sample units sample units randomly drawn from these populations. It also includes the population parameter values chosen by the user.

Sample

contains the dot plots and box plots of two samples drawn randomly from the two populations and rug plots of the sample units. It also includes the mean and standard deviation of two random samples.

Test Statistic

contains the plots showing the mean difference between two groups and corresponding 95% confidence intervals (CI). The tab also contains a panel of the distribution of the test statistic t with the observed value of the test statistic and probabilities under the given value of the Type 1 error

Summary

includes the summary of the sampled data and outcomes from the one-sample Student's t-test. Different sections are: (1) Hypothesis, highlighting the null and alternative hypothesis; (2) Sample, tabulating the full sampled data; (3) Summary Statistics, summarising the summary information of two samples; (4) Test Statistic, presenting the outputs from independent two-sample Student's t-test. (5) Confidence Interval, highlighting the mean difference and corresponding 95% confidence intervals (CI).

Note

https://shiny.abdn.ac.uk/Stats/apps/

Author(s)

Mintu Nath

See Also

Function in base R for normal distribution and t distribution including dnorm, pnorm, qnorm, rnorm, dt, pt, qt, rt

Examples

if(interactive()){
    library(ggplot2)
    library(shiny)
    library(ABACUS)
    # Run shiny app
    shiny_twosampt()
}