| Title: | Basics Menu for Radiant: Business Analytics using R and Shiny |
|---|---|
| Description: | The Radiant Basics menu includes interfaces for probability calculation, central limit theorem simulation, comparing means and proportions, goodness-of-fit testing, cross-tabs, and correlation. The application extends the functionality in 'radiant.data'. |
| Authors: | Vincent Nijs [aut, cre] |
| Maintainer: | Vincent Nijs <[email protected]> |
| License: | AGPL-3 | file LICENSE |
| Version: | 1.6.6 |
| Built: | 2026-05-18 09:48:00 UTC |
| Source: | https://github.com/radiant-rstats/radiant.basics |
Central Limit Theorem simulation
clt( dist, n = 100, m = 100, norm_mean = 0, norm_sd = 1, binom_size = 10, binom_prob = 0.2, unif_min = 0, unif_max = 1, expo_rate = 1 )clt( dist, n = 100, m = 100, norm_mean = 0, norm_sd = 1, binom_size = 10, binom_prob = 0.2, unif_min = 0, unif_max = 1, expo_rate = 1 )
dist |
Distribution to simulate |
n |
Sample size |
m |
Number of samples |
norm_mean |
Mean for the normal distribution |
norm_sd |
Standard deviation for the normal distribution |
binom_size |
Size for the binomial distribution |
binom_prob |
Probability for the binomial distribution |
unif_min |
Minimum for the uniform distribution |
unif_max |
Maximum for the uniform distribution |
expo_rate |
Rate for the exponential distribution |
See https://radiant-rstats.github.io/docs/basics/clt.html for an example in Radiant
A list with the name of the Distribution and a matrix of simulated data
clt("Uniform", 10, 10, unif_min = 10, unif_max = 20)clt("Uniform", 10, 10, unif_min = 10, unif_max = 20)
Compare sample means
compare_means( dataset, var1, var2, samples = "independent", alternative = "two.sided", conf_lev = 0.95, comb = "", adjust = "none", test = "t", data_filter = "", envir = parent.frame() )compare_means( dataset, var1, var2, samples = "independent", alternative = "two.sided", conf_lev = 0.95, comb = "", adjust = "none", test = "t", data_filter = "", envir = parent.frame() )
dataset |
Dataset |
var1 |
A numeric variable or factor selected for comparison |
var2 |
One or more numeric variables for comparison. If var1 is a factor only one variable can be selected and the mean of this variable is compared across (factor) levels of var1 |
samples |
Are samples independent ("independent") or not ("paired") |
alternative |
The alternative hypothesis ("two.sided", "greater" or "less") |
conf_lev |
Span of the confidence interval |
comb |
Combinations to evaluate |
adjust |
Adjustment for multiple comparisons ("none" or "bonf" for Bonferroni) |
test |
t-test ("t") or Wilcox ("wilcox") |
data_filter |
Expression entered in, e.g., Data > View to filter the dataset in Radiant. The expression should be a string (e.g., "price > 10000") |
envir |
Environment to extract data from |
See https://radiant-rstats.github.io/docs/basics/compare_means.html for an example in Radiant
A list of all variables defined in the function as an object of class compare_means
summary.compare_means to summarize results
plot.compare_means to plot results
compare_means(diamonds, "cut", "price") %>% str()compare_means(diamonds, "cut", "price") %>% str()
Compare sample proportions across groups
compare_props( dataset, var1, var2, levs = "", alternative = "two.sided", conf_lev = 0.95, comb = "", adjust = "none", data_filter = "", envir = parent.frame() )compare_props( dataset, var1, var2, levs = "", alternative = "two.sided", conf_lev = 0.95, comb = "", adjust = "none", data_filter = "", envir = parent.frame() )
dataset |
Dataset |
var1 |
A grouping variable to split the data for comparisons |
var2 |
The variable to calculate proportions for |
levs |
The factor level selected for the proportion comparison |
alternative |
The alternative hypothesis ("two.sided", "greater" or "less") |
conf_lev |
Span of the confidence interval |
comb |
Combinations to evaluate |
adjust |
Adjustment for multiple comparisons ("none" or "bonf" for Bonferroni) |
data_filter |
Expression entered in, e.g., Data > View to filter the dataset in Radiant. The expression should be a string (e.g., "price > 10000") |
envir |
Environment to extract data from |
See https://radiant-rstats.github.io/docs/basics/compare_props.html for an example in Radiant
A list of all variables defined in the function as an object of class compare_props
summary.compare_props to summarize results
plot.compare_props to plot results
compare_props(titanic, "pclass", "survived") %>% str()compare_props(titanic, "pclass", "survived") %>% str()
Car brand consideration
data(consider)data(consider)
A data frame with 1000 rows and 2 variables
Survey data of consumer purchase intentions. Description provided in attr(consider,"description")
Store a correlation matrix as a (long) data.frame
cor2df(object, labels = c("label1", "label2"), ...)cor2df(object, labels = c("label1", "label2"), ...)
object |
Return value from |
labels |
Column names for the correlation pairs |
... |
further arguments passed to or from other methods |
Return the correlation matrix as a (long) data.frame. See https://radiant-rstats.github.io/docs/basics/correlation.html for an example in Radiant
Calculate correlations for two or more variables
correlation( dataset, vars = "", method = "pearson", hcor = FALSE, hcor_se = FALSE, data_filter = "", envir = parent.frame() )correlation( dataset, vars = "", method = "pearson", hcor = FALSE, hcor_se = FALSE, data_filter = "", envir = parent.frame() )
dataset |
Dataset |
vars |
Variables to include in the analysis. Default is all but character and factor variables with more than two unique values are removed |
method |
Type of correlations to calculate. Options are "pearson", "spearman", and "kendall". "pearson" is the default |
hcor |
Use polycor::hetcor to calculate the correlation matrix |
hcor_se |
Calculate standard errors when using polycor::hetcor |
data_filter |
Expression entered in, e.g., Data > View to filter the dataset in Radiant. The expression should be a string (e.g., "price > 10000") |
envir |
Environment to extract data from |
See https://radiant-rstats.github.io/docs/basics/correlation.html for an example in Radiant
A list with all variables defined in the function as an object of class compare_means
summary.correlation to summarize results
plot.correlation to plot results
correlation(diamonds, c("price", "carat")) %>% str() correlation(diamonds, "x:z") %>% str()correlation(diamonds, c("price", "carat")) %>% str() correlation(diamonds, "x:z") %>% str()
Evaluate associations between categorical variables
cross_tabs( dataset, var1, var2, tab = NULL, data_filter = "", envir = parent.frame() )cross_tabs( dataset, var1, var2, tab = NULL, data_filter = "", envir = parent.frame() )
dataset |
Dataset (i.e., a data.frame or table) |
var1 |
A categorical variable |
var2 |
A categorical variable |
tab |
Table with frequencies as alternative to dataset |
data_filter |
Expression entered in, e.g., Data > View to filter the dataset in Radiant. The expression should be a string (e.g., "price > 10000") |
envir |
Environment to extract data from |
See https://radiant-rstats.github.io/docs/basics/cross_tabs.html for an example in Radiant
A list of all variables used in cross_tabs as an object of class cross_tabs
summary.cross_tabs to summarize results
plot.cross_tabs to plot results
cross_tabs(newspaper, "Income", "Newspaper") %>% str() table(select(newspaper, Income, Newspaper)) %>% cross_tabs(tab = .)cross_tabs(newspaper, "Income", "Newspaper") %>% str() table(select(newspaper, Income, Newspaper)) %>% cross_tabs(tab = .)
Demand in the UK
data(demand_uk)data(demand_uk)
A data frame with 1000 rows and 2 variables
Survey data of consumer purchase intentions. Description provided in attr(demand_uk,"description")
Evaluate if sample data for a categorical variable is consistent with a hypothesized distribution
goodness( dataset, var, p = NULL, tab = NULL, data_filter = "", envir = parent.frame() )goodness( dataset, var, p = NULL, tab = NULL, data_filter = "", envir = parent.frame() )
dataset |
Dataset |
var |
A categorical variable |
p |
Hypothesized distribution as a number, fraction, or numeric vector. If unspecified, defaults to an even distribution |
tab |
Table with frequencies as alternative to dataset |
data_filter |
Expression entered in, e.g., Data > View to filter the dataset in Radiant. The expression should be a string (e.g., "price > 10000") |
envir |
Environment to extract data from |
See https://radiant-rstats.github.io/docs/basics/goodness.html for an example in Radiant
A list of all variables used in goodness as an object of class goodness
summary.goodness to summarize results
plot.goodness to plot results
goodness(newspaper, "Income") %>% str() goodness(newspaper, "Income", p = c(3 / 4, 1 / 4)) %>% str() table(select(newspaper, Income)) %>% goodness(tab = .)goodness(newspaper, "Income") %>% str() goodness(newspaper, "Income", p = c(3 / 4, 1 / 4)) %>% str() table(select(newspaper, Income)) %>% goodness(tab = .)
Newspaper readership
data(newspaper)data(newspaper)
A data frame with 580 rows and 2 variables
Newspaper readership data for 580 consumers. Description provided in attr(newspaper,"description")
Plot method for the Central Limit Theorem simulation
## S3 method for class 'clt' plot(x, stat = "sum", bins = 15, ...)## S3 method for class 'clt' plot(x, stat = "sum", bins = 15, ...)
x |
Return value from |
stat |
Statistic to use (sum or mean) |
bins |
Number of bins to use |
... |
further arguments passed to or from other methods |
See https://radiant-rstats.github.io/docs/basics/clt.html for an example in Radiant
clt("Uniform", 100, 100, unif_min = 10, unif_max = 20) %>% plot()clt("Uniform", 100, 100, unif_min = 10, unif_max = 20) %>% plot()
Plot method for the compare_means function
## S3 method for class 'compare_means' plot(x, plots = "scatter", shiny = FALSE, custom = FALSE, ...)## S3 method for class 'compare_means' plot(x, plots = "scatter", shiny = FALSE, custom = FALSE, ...)
x |
Return value from |
plots |
One or more plots ("bar", "density", "box", or "scatter") |
shiny |
Did the function call originate inside a shiny app |
custom |
Logical (TRUE, FALSE) to indicate if ggplot object (or list of ggplot objects) should be returned. This option can be used to customize plots (e.g., add a title, change x and y labels, etc.). See examples and https://ggplot2.tidyverse.org/ for options. |
... |
further arguments passed to or from other methods |
See https://radiant-rstats.github.io/docs/basics/compare_means.html for an example in Radiant
compare_means to calculate results
summary.compare_means to summarize results
result <- compare_means(diamonds, "cut", "price") plot(result, plots = c("bar", "density"))result <- compare_means(diamonds, "cut", "price") plot(result, plots = c("bar", "density"))
Plot method for the compare_props function
## S3 method for class 'compare_props' plot(x, plots = "bar", shiny = FALSE, custom = FALSE, ...)## S3 method for class 'compare_props' plot(x, plots = "bar", shiny = FALSE, custom = FALSE, ...)
x |
Return value from |
plots |
One or more plots of proportions ("bar" or "dodge") |
shiny |
Did the function call originate inside a shiny app |
custom |
Logical (TRUE, FALSE) to indicate if ggplot object (or list of ggplot objects) should be returned. This option can be used to customize plots (e.g., add a title, change x and y labels, etc.). See examples and https://ggplot2.tidyverse.org/ for options. |
... |
further arguments passed to or from other methods |
See https://radiant-rstats.github.io/docs/basics/compare_props.html for an example in Radiant
compare_props to calculate results
summary.compare_props to summarize results
result <- compare_props(titanic, "pclass", "survived") plot(result, plots = c("bar", "dodge"))result <- compare_props(titanic, "pclass", "survived") plot(result, plots = c("bar", "dodge"))
Plot method for the correlation function
## S3 method for class 'correlation' plot(x, nrobs = -1, jit = c(0, 0), dec = 2, ...)## S3 method for class 'correlation' plot(x, nrobs = -1, jit = c(0, 0), dec = 2, ...)
x |
Return value from |
nrobs |
Number of data points to show in scatter plots (-1 for all) |
jit |
A numeric vector that determines the amount of jittering to apply to the x and y variables in a scatter plot. Default is 0. Use, e.g., 0.3 to add some jittering |
dec |
Number of decimals to show |
... |
further arguments passed to or from other methods. |
See https://radiant-rstats.github.io/docs/basics/correlation.html for an example in Radiant
correlation to calculate results
summary.correlation to summarize results
result <- correlation(diamonds, c("price", "carat", "table")) plot(result)result <- correlation(diamonds, c("price", "carat", "table")) plot(result)
Plot method for the cross_tabs function
## S3 method for class 'cross_tabs' plot(x, check = "", shiny = FALSE, custom = FALSE, ...)## S3 method for class 'cross_tabs' plot(x, check = "", shiny = FALSE, custom = FALSE, ...)
x |
Return value from |
check |
Show plots for variables var1 and var2. "observed" for the observed frequencies table, "expected" for the expected frequencies table (i.e., frequencies that would be expected if the null hypothesis holds), "chi_sq" for the contribution to the overall chi-squared statistic for each cell (i.e., (o - e)^2 / e), "dev_std" for the standardized differences between the observed and expected frequencies (i.e., (o - e) / sqrt(e)), and "row_perc", "col_perc", and "perc" for row, column, and table percentages respectively |
shiny |
Did the function call originate inside a shiny app |
custom |
Logical (TRUE, FALSE) to indicate if ggplot object (or list of ggplot objects) should be returned. This option can be used to customize plots (e.g., add a title, change x and y labels, etc.). See examples and https://ggplot2.tidyverse.org/ for options. |
... |
further arguments passed to or from other methods |
See https://radiant-rstats.github.io/docs/basics/cross_tabs.html for an example in Radiant
cross_tabs to calculate results
summary.cross_tabs to summarize results
result <- cross_tabs(newspaper, "Income", "Newspaper") plot(result, check = c("observed", "expected", "chi_sq"))result <- cross_tabs(newspaper, "Income", "Newspaper") plot(result, check = c("observed", "expected", "chi_sq"))
Plot method for the goodness function
## S3 method for class 'goodness' plot(x, check = "", fillcol = "blue", shiny = FALSE, custom = FALSE, ...)## S3 method for class 'goodness' plot(x, check = "", fillcol = "blue", shiny = FALSE, custom = FALSE, ...)
x |
Return value from |
check |
Show plots for variable var. "observed" for the observed frequencies table, "expected" for the expected frequencies table (i.e., frequencies that would be expected if the null hypothesis holds), "chi_sq" for the contribution to the overall chi-squared statistic for each cell (i.e., (o - e)^2 / e), and "dev_std" for the standardized differences between the observed and expected frequencies (i.e., (o - e) / sqrt(e)) |
fillcol |
Color used for bar plots |
shiny |
Did the function call originate inside a shiny app |
custom |
Logical (TRUE, FALSE) to indicate if ggplot object (or list of ggplot objects) should be returned. This option can be used to customize plots (e.g., add a title, change x and y labels, etc.). See examples and https://ggplot2.tidyverse.org/ for options. |
... |
further arguments passed to or from other methods |
See https://radiant-rstats.github.io/docs/basics/goodness for an example in Radiant
goodness to calculate results
summary.goodness to summarize results
result <- goodness(newspaper, "Income") plot(result, check = c("observed", "expected", "chi_sq")) goodness(newspaper, "Income") %>% plot(c("observed", "expected"))result <- goodness(newspaper, "Income") plot(result, check = c("observed", "expected", "chi_sq")) goodness(newspaper, "Income") %>% plot(c("observed", "expected"))
Plot method for the probability calculator (binomial)
## S3 method for class 'prob_binom' plot(x, type = "values", ...)## S3 method for class 'prob_binom' plot(x, type = "values", ...)
x |
Return value from |
type |
Probabilities ("probs") or values ("values") |
... |
further arguments passed to or from other methods |
See https://radiant-rstats.github.io/docs/basics/prob_calc.html for an example in Radiant
prob_binom to calculate results
summary.prob_binom to summarize results
result <- prob_binom(n = 10, p = 0.3, ub = 3) plot(result, type = "values")result <- prob_binom(n = 10, p = 0.3, ub = 3) plot(result, type = "values")
Plot method for the probability calculator (Chi-squared distribution)
## S3 method for class 'prob_chisq' plot(x, type = "values", ...)## S3 method for class 'prob_chisq' plot(x, type = "values", ...)
x |
Return value from |
type |
Probabilities ("probs") or values ("values") |
... |
further arguments passed to or from other methods |
See https://radiant-rstats.github.io/docs/basics/prob_calc.html for an example in Radiant
prob_chisq to calculate results
summary.prob_chisq to summarize results
result <- prob_chisq(df = 1, ub = 3.841) plot(result, type = "values")result <- prob_chisq(df = 1, ub = 3.841) plot(result, type = "values")
Plot method for the probability calculator (discrete)
## S3 method for class 'prob_disc' plot(x, type = "values", ...)## S3 method for class 'prob_disc' plot(x, type = "values", ...)
x |
Return value from |
type |
Probabilities ("probs") or values ("values") |
... |
further arguments passed to or from other methods |
See https://radiant-rstats.github.io/docs/basics/prob_calc.html for an example in Radiant
prob_disc to calculate results
summary.prob_disc to summarize results
result <- prob_disc(v = 1:6, p = c(2 / 6, 2 / 6, 1 / 12, 1 / 12, 1 / 12, 1 / 12), pub = 0.95) plot(result, type = "probs")result <- prob_disc(v = 1:6, p = c(2 / 6, 2 / 6, 1 / 12, 1 / 12, 1 / 12, 1 / 12), pub = 0.95) plot(result, type = "probs")
Plot method for the probability calculator (Exponential distribution)
## S3 method for class 'prob_expo' plot(x, type = "values", ...)## S3 method for class 'prob_expo' plot(x, type = "values", ...)
x |
Return value from |
type |
Probabilities ("probs") or values ("values") |
... |
further arguments passed to or from other methods |
See https://radiant-rstats.github.io/docs/basics/prob_calc.html for an example in Radiant
prob_expo to calculate results
summary.prob_expo to summarize results
result <- prob_expo(rate = 1, ub = 2.996) plot(result, type = "values")result <- prob_expo(rate = 1, ub = 2.996) plot(result, type = "values")
Plot method for the probability calculator (F-distribution)
## S3 method for class 'prob_fdist' plot(x, type = "values", ...)## S3 method for class 'prob_fdist' plot(x, type = "values", ...)
x |
Return value from |
type |
Probabilities ("probs") or values ("values") |
... |
further arguments passed to or from other methods |
See https://radiant-rstats.github.io/docs/basics/prob_calc.html for an example in Radiant
prob_fdist to calculate results
summary.prob_fdist to summarize results
result <- prob_fdist(df1 = 10, df2 = 10, ub = 2.978) plot(result, type = "values")result <- prob_fdist(df1 = 10, df2 = 10, ub = 2.978) plot(result, type = "values")
Plot method for the probability calculator (log normal)
## S3 method for class 'prob_lnorm' plot(x, type = "values", ...)## S3 method for class 'prob_lnorm' plot(x, type = "values", ...)
x |
Return value from |
type |
Probabilities ("probs") or values ("values") |
... |
further arguments passed to or from other methods |
See https://radiant-rstats.github.io/docs/basics/prob_calc.html for an example in Radiant
prob_lnorm to calculate results
plot.prob_lnorm to plot results
result <- prob_lnorm(meanlog = 0, sdlog = 1, lb = 0, ub = 1) plot(result, type = "values")result <- prob_lnorm(meanlog = 0, sdlog = 1, lb = 0, ub = 1) plot(result, type = "values")
Plot method for the probability calculator (normal)
## S3 method for class 'prob_norm' plot(x, type = "values", ...)## S3 method for class 'prob_norm' plot(x, type = "values", ...)
x |
Return value from |
type |
Probabilities ("probs") or values ("values") |
... |
further arguments passed to or from other methods |
See https://radiant-rstats.github.io/docs/basics/prob_calc.html for an example in Radiant
prob_norm to calculate results
summary.prob_norm to summarize results
result <- prob_norm(mean = 0, stdev = 1, ub = 0) plot(result)result <- prob_norm(mean = 0, stdev = 1, ub = 0) plot(result)
Plot method for the probability calculator (poisson)
## S3 method for class 'prob_pois' plot(x, type = "values", ...)## S3 method for class 'prob_pois' plot(x, type = "values", ...)
x |
Return value from |
type |
Probabilities ("probs") or values ("values") |
... |
further arguments passed to or from other methods |
See https://radiant-rstats.github.io/docs/basics/prob_calc.html for an example in Radiant
prob_pois to calculate results
summary.prob_pois to summarize results
result <- prob_pois(lambda = 1, ub = 3) plot(result, type = "values")result <- prob_pois(lambda = 1, ub = 3) plot(result, type = "values")
Plot method for the probability calculator (t-distribution)
## S3 method for class 'prob_tdist' plot(x, type = "values", ...)## S3 method for class 'prob_tdist' plot(x, type = "values", ...)
x |
Return value from |
type |
Probabilities ("probs") or values ("values") |
... |
further arguments passed to or from other methods |
See https://radiant-rstats.github.io/docs/basics/prob_calc.html for an example in Radiant
prob_tdist to calculate results
summary.prob_tdist to summarize results
result <- prob_tdist(df = 10, ub = 2.228) plot(result, type = "values")result <- prob_tdist(df = 10, ub = 2.228) plot(result, type = "values")
Plot method for the probability calculator (uniform)
## S3 method for class 'prob_unif' plot(x, type = "values", ...)## S3 method for class 'prob_unif' plot(x, type = "values", ...)
x |
Return value from |
type |
Probabilities ("probs") or values ("values") |
... |
further arguments passed to or from other methods |
See https://radiant-rstats.github.io/docs/basics/prob_calc.html for an example in Radiant
prob_unif to calculate results
summary.prob_unif to summarize results
result <- prob_unif(min = 0, max = 1, ub = 0.3) plot(result, type = "values")result <- prob_unif(min = 0, max = 1, ub = 0.3) plot(result, type = "values")
Plot method for the single_mean function
## S3 method for class 'single_mean' plot(x, plots = "hist", shiny = FALSE, custom = FALSE, ...)## S3 method for class 'single_mean' plot(x, plots = "hist", shiny = FALSE, custom = FALSE, ...)
x |
Return value from |
plots |
Plots to generate. "hist" shows a histogram of the data along with vertical lines that indicate the sample mean and the confidence interval. "simulate" shows the location of the sample mean and the comparison value (comp_value). Simulation is used to demonstrate the sampling variability in the data under the null-hypothesis |
shiny |
Did the function call originate inside a shiny app |
custom |
Logical (TRUE, FALSE) to indicate if ggplot object (or list of ggplot objects) should be returned. This option can be used to customize plots (e.g., add a title, change x and y labels, etc.). See examples and https://ggplot2.tidyverse.org/ for options. |
... |
further arguments passed to or from other methods |
See https://radiant-rstats.github.io/docs/basics/single_mean.html for an example in Radiant
single_mean to generate the result
summary.single_mean to summarize results
result <- single_mean(diamonds, "price", comp_value = 3500) plot(result, plots = c("hist", "simulate"))result <- single_mean(diamonds, "price", comp_value = 3500) plot(result, plots = c("hist", "simulate"))
Plot method for the single_prop function
## S3 method for class 'single_prop' plot(x, plots = "bar", shiny = FALSE, custom = FALSE, ...)## S3 method for class 'single_prop' plot(x, plots = "bar", shiny = FALSE, custom = FALSE, ...)
x |
Return value from |
plots |
Plots to generate. "bar" shows a bar chart of the data. The "simulate" chart shows the location of the sample proportion and the comparison value (comp_value). Simulation is used to demonstrate the sampling variability in the data under the null-hypothesis |
shiny |
Did the function call originate inside a shiny app |
custom |
Logical (TRUE, FALSE) to indicate if ggplot object (or list of ggplot objects) should be returned. This option can be used to customize plots (e.g., add a title, change x and y labels, etc.). See examples and https://ggplot2.tidyverse.org/ for options. |
... |
further arguments passed to or from other methods |
See https://radiant-rstats.github.io/docs/basics/single_prop.html for an example in Radiant
single_prop to generate the result
summary.single_prop to summarize the results
result <- single_prop(titanic, "survived", lev = "Yes", comp_value = 0.5, alternative = "less") plot(result, plots = c("bar", "simulate"))result <- single_prop(titanic, "survived", lev = "Yes", comp_value = 0.5, alternative = "less") plot(result, plots = c("bar", "simulate"))
Print method for the correlation function
## S3 method for class 'rcorr' print(x, ...)## S3 method for class 'rcorr' print(x, ...)
x |
Return value from |
... |
further arguments passed to or from other methods |
Probability calculator for the binomial distribution
prob_binom(n, p, lb = NA, ub = NA, plb = NA, pub = NA, dec = 3)prob_binom(n, p, lb = NA, ub = NA, plb = NA, pub = NA, dec = 3)
n |
Number of trials |
p |
Probability |
lb |
Lower bound on the number of successes |
ub |
Upper bound on the number of successes |
plb |
Lower probability bound |
pub |
Upper probability bound |
dec |
Number of decimals to show |
See https://radiant-rstats.github.io/docs/basics/prob_calc.html for an example in Radiant
summary.prob_binom to summarize results
plot.prob_binom to plot results
prob_binom(n = 10, p = 0.3, ub = 3)prob_binom(n = 10, p = 0.3, ub = 3)
Probability calculator for the chi-squared distribution
prob_chisq(df, lb = NA, ub = NA, plb = NA, pub = NA, dec = 3)prob_chisq(df, lb = NA, ub = NA, plb = NA, pub = NA, dec = 3)
df |
Degrees of freedom |
lb |
Lower bound (default is 0) |
ub |
Upper bound (default is Inf) |
plb |
Lower probability bound |
pub |
Upper probability bound |
dec |
Number of decimals to show |
See https://radiant-rstats.github.io/docs/basics/prob_calc.html for an example in Radiant
summary.prob_chisq to summarize results
plot.prob_chisq to plot results
prob_chisq(df = 1, ub = 3.841)prob_chisq(df = 1, ub = 3.841)
Probability calculator for a discrete distribution
prob_disc(v, p, lb = NA, ub = NA, plb = NA, pub = NA, dec = 3)prob_disc(v, p, lb = NA, ub = NA, plb = NA, pub = NA, dec = 3)
v |
Values |
p |
Probabilities |
lb |
Lower bound on the number of successes |
ub |
Upper bound on the number of successes |
plb |
Lower probability bound |
pub |
Upper probability bound |
dec |
Number of decimals to show |
See https://radiant-rstats.github.io/docs/basics/prob_calc.html for an example in Radiant
summary.prob_disc to summarize results
plot.prob_disc to plot results
prob_disc(v = 1:6, p = 1 / 6, pub = 0.95) prob_disc(v = 1:6, p = c(2 / 6, 2 / 6, 1 / 12, 1 / 12, 1 / 12, 1 / 12), pub = 0.95)prob_disc(v = 1:6, p = 1 / 6, pub = 0.95) prob_disc(v = 1:6, p = c(2 / 6, 2 / 6, 1 / 12, 1 / 12, 1 / 12, 1 / 12), pub = 0.95)
Probability calculator for the exponential distribution
prob_expo(rate, lb = NA, ub = NA, plb = NA, pub = NA, dec = 3)prob_expo(rate, lb = NA, ub = NA, plb = NA, pub = NA, dec = 3)
rate |
Rate |
lb |
Lower bound (default is 0) |
ub |
Upper bound (default is Inf) |
plb |
Lower probability bound |
pub |
Upper probability bound |
dec |
Number of decimals to show |
See https://radiant-rstats.github.io/docs/basics/prob_calc.html for an example in Radiant
summary.prob_expo to summarize results
plot.prob_expo to plot results
prob_expo(rate = 1, ub = 2.996)prob_expo(rate = 1, ub = 2.996)
Probability calculator for the F-distribution
prob_fdist(df1, df2, lb = NA, ub = NA, plb = NA, pub = NA, dec = 3)prob_fdist(df1, df2, lb = NA, ub = NA, plb = NA, pub = NA, dec = 3)
df1 |
Degrees of freedom |
df2 |
Degrees of freedom |
lb |
Lower bound (default is 0) |
ub |
Upper bound (default is Inf) |
plb |
Lower probability bound |
pub |
Upper probability bound |
dec |
Number of decimals to show |
See https://radiant-rstats.github.io/docs/basics/prob_calc.html for an example in Radiant
summary.prob_fdist to summarize results
plot.prob_fdist to plot results
prob_fdist(df1 = 10, df2 = 10, ub = 2.978)prob_fdist(df1 = 10, df2 = 10, ub = 2.978)
Probability calculator for the log normal distribution
prob_lnorm(meanlog, sdlog, lb = NA, ub = NA, plb = NA, pub = NA, dec = 3)prob_lnorm(meanlog, sdlog, lb = NA, ub = NA, plb = NA, pub = NA, dec = 3)
meanlog |
Mean of the distribution on the log scale |
sdlog |
Standard deviation of the distribution on the log scale |
lb |
Lower bound (default is -Inf) |
ub |
Upper bound (default is Inf) |
plb |
Lower probability bound |
pub |
Upper probability bound |
dec |
Number of decimals to show |
See https://radiant-rstats.github.io/docs/basics/prob_calc.html for an example in Radiant
summary.prob_lnorm to summarize results
plot.prob_lnorm to plot results
prob_lnorm(meanlog = 0, sdlog = 1, lb = 0, ub = 1)prob_lnorm(meanlog = 0, sdlog = 1, lb = 0, ub = 1)
Probability calculator for the normal distribution
prob_norm(mean, stdev, lb = NA, ub = NA, plb = NA, pub = NA, dec = 3)prob_norm(mean, stdev, lb = NA, ub = NA, plb = NA, pub = NA, dec = 3)
mean |
Mean |
stdev |
Standard deviation |
lb |
Lower bound (default is -Inf) |
ub |
Upper bound (default is Inf) |
plb |
Lower probability bound |
pub |
Upper probability bound |
dec |
Number of decimals to show |
See https://radiant-rstats.github.io/docs/basics/prob_calc.html for an example in Radiant
summary.prob_norm to summarize results
plot.prob_norm to plot results
prob_norm(mean = 0, stdev = 1, ub = 0)prob_norm(mean = 0, stdev = 1, ub = 0)
Probability calculator for the poisson distribution
prob_pois(lambda, lb = NA, ub = NA, plb = NA, pub = NA, dec = 3)prob_pois(lambda, lb = NA, ub = NA, plb = NA, pub = NA, dec = 3)
lambda |
Rate |
lb |
Lower bound (default is 0) |
ub |
Upper bound (default is Inf) |
plb |
Lower probability bound |
pub |
Upper probability bound |
dec |
Number of decimals to show |
See https://radiant-rstats.github.io/docs/basics/prob_calc.html for an example in Radiant
summary.prob_pois to summarize results
plot.prob_pois to plot results
prob_pois(lambda = 1, ub = 3)prob_pois(lambda = 1, ub = 3)
Probability calculator for the t-distribution
prob_tdist(df, lb = NA, ub = NA, plb = NA, pub = NA, dec = 3)prob_tdist(df, lb = NA, ub = NA, plb = NA, pub = NA, dec = 3)
df |
Degrees of freedom |
lb |
Lower bound (default is -Inf) |
ub |
Upper bound (default is Inf) |
plb |
Lower probability bound |
pub |
Upper probability bound |
dec |
Number of decimals to show |
See https://radiant-rstats.github.io/docs/basics/prob_calc.html for an example in Radiant
summary.prob_tdist to summarize results
plot.prob_tdist to plot results
prob_tdist(df = 10, ub = 2.228)prob_tdist(df = 10, ub = 2.228)
Probability calculator for the uniform distribution
prob_unif(min, max, lb = NA, ub = NA, plb = NA, pub = NA, dec = 3)prob_unif(min, max, lb = NA, ub = NA, plb = NA, pub = NA, dec = 3)
min |
Minimum value |
max |
Maximum value |
lb |
Lower bound (default = 0) |
ub |
Upper bound (default = 1) |
plb |
Lower probability bound |
pub |
Upper probability bound |
dec |
Number of decimals to show |
See https://radiant-rstats.github.io/docs/basics/prob_calc.html for an example in Radiant
summary.prob_unif to summarize results
plot.prob_unif to plot results
prob_unif(min = 0, max = 1, ub = 0.3)prob_unif(min = 0, max = 1, ub = 0.3)
Launch radiant.basics in the default web browser
radiant.basics(state, ...)radiant.basics(state, ...)
state |
Path to state file to load |
... |
additional arguments to pass to shiny::runApp (e.g, port = 8080) |
See https://radiant-rstats.github.io/docs/ for documentation and tutorials
## Not run: radiant.basics() ## End(Not run)## Not run: radiant.basics() ## End(Not run)
Launch radiant.basics in the Rstudio viewer
radiant.basics_viewer(state, ...)radiant.basics_viewer(state, ...)
state |
Path to state file to load |
... |
additional arguments to pass to shiny::runApp (e.g, port = 8080) |
See https://radiant-rstats.github.io/docs/ for documentation and tutorials
## Not run: radiant.basics_viewer() ## End(Not run)## Not run: radiant.basics_viewer() ## End(Not run)
Launch radiant.basics in an Rstudio window
radiant.basics_window(state, ...)radiant.basics_window(state, ...)
state |
Path to state file to load |
... |
additional arguments to pass to shiny::runApp (e.g, port = 8080) |
See https://radiant-rstats.github.io/docs/ for documentation and tutorials
## Not run: radiant.basics_window() ## End(Not run)## Not run: radiant.basics_window() ## End(Not run)
Salaries for Professors
data(salary)data(salary)
A data frame with 397 rows and 6 variables
2008-2009 nine-month salary for professors in a college in the US. Description provided in attr(salary,description")
Compare a sample mean to a population mean
single_mean( dataset, var, comp_value = 0, alternative = "two.sided", conf_lev = 0.95, data_filter = "", envir = parent.frame() )single_mean( dataset, var, comp_value = 0, alternative = "two.sided", conf_lev = 0.95, data_filter = "", envir = parent.frame() )
dataset |
Dataset |
var |
The variable selected for the mean comparison |
comp_value |
Population value to compare to the sample mean |
alternative |
The alternative hypothesis ("two.sided", "greater", or "less") |
conf_lev |
Span for the confidence interval |
data_filter |
Expression entered in, e.g., Data > View to filter the dataset in Radiant. The expression should be a string (e.g., "price > 10000") |
envir |
Environment to extract data from |
See https://radiant-rstats.github.io/docs/basics/single_mean.html for an example in Radiant
A list of variables defined in single_mean as an object of class single_mean
summary.single_mean to summarize results
plot.single_mean to plot results
single_mean(diamonds, "price") %>% str()single_mean(diamonds, "price") %>% str()
Compare a sample proportion to a population proportion
single_prop( dataset, var, lev = "", comp_value = 0.5, alternative = "two.sided", conf_lev = 0.95, test = "binom", data_filter = "", envir = parent.frame() )single_prop( dataset, var, lev = "", comp_value = 0.5, alternative = "two.sided", conf_lev = 0.95, test = "binom", data_filter = "", envir = parent.frame() )
dataset |
Dataset |
var |
The variable selected for the proportion comparison |
lev |
The factor level selected for the proportion comparison |
comp_value |
Population value to compare to the sample proportion |
alternative |
The alternative hypothesis ("two.sided", "greater", or "less") |
conf_lev |
Span of the confidence interval |
test |
bionomial exact test ("binom") or Z-test ("z") |
data_filter |
Expression entered in, e.g., Data > View to filter the dataset in Radiant. The expression should be a string (e.g., "price > 10000") |
envir |
Environment to extract data from |
See https://radiant-rstats.github.io/docs/basics/single_prop.html for an example in Radiant
A list of variables used in single_prop as an object of class single_prop
summary.single_prop to summarize the results
plot.single_prop to plot the results
single_prop(titanic, "survived") %>% str() single_prop(titanic, "survived", lev = "Yes", comp_value = 0.5, alternative = "less") %>% str()single_prop(titanic, "survived") %>% str() single_prop(titanic, "survived", lev = "Yes", comp_value = 0.5, alternative = "less") %>% str()
Summary method for the compare_means function
## S3 method for class 'compare_means' summary(object, show = FALSE, dec = 3, ...)## S3 method for class 'compare_means' summary(object, show = FALSE, dec = 3, ...)
object |
Return value from |
show |
Show additional output (i.e., t.value, df, and confidence interval) |
dec |
Number of decimals to show |
... |
further arguments passed to or from other methods |
See https://radiant-rstats.github.io/docs/basics/compare_means.html for an example in Radiant
compare_means to calculate results
plot.compare_means to plot results
result <- compare_means(diamonds, "cut", "price") summary(result)result <- compare_means(diamonds, "cut", "price") summary(result)
Summary method for the compare_props function
## S3 method for class 'compare_props' summary(object, show = FALSE, dec = 3, ...)## S3 method for class 'compare_props' summary(object, show = FALSE, dec = 3, ...)
object |
Return value from |
show |
Show additional output (i.e., chisq.value, df, and confidence interval) |
dec |
Number of decimals to show |
... |
further arguments passed to or from other methods |
See https://radiant-rstats.github.io/docs/basics/compare_props.html for an example in Radiant
compare_props to calculate results
plot.compare_props to plot results
result <- compare_props(titanic, "pclass", "survived") summary(result)result <- compare_props(titanic, "pclass", "survived") summary(result)
Summary method for the correlation function
## S3 method for class 'correlation' summary(object, cutoff = 0, covar = FALSE, dec = 2, ...)## S3 method for class 'correlation' summary(object, cutoff = 0, covar = FALSE, dec = 2, ...)
object |
Return value from |
cutoff |
Show only correlations larger than the cutoff in absolute value. Default is a cutoff of 0 |
covar |
Show the covariance matrix (default is FALSE) |
dec |
Number of decimals to show |
... |
further arguments passed to or from other methods. |
See https://radiant-rstats.github.io/docs/basics/correlation.html for an example in Radiant
correlation to calculate results
plot.correlation to plot results
result <- correlation(diamonds, c("price", "carat", "table")) summary(result, cutoff = .3)result <- correlation(diamonds, c("price", "carat", "table")) summary(result, cutoff = .3)
Summary method for the cross_tabs function
## S3 method for class 'cross_tabs' summary(object, check = "", dec = 2, ...)## S3 method for class 'cross_tabs' summary(object, check = "", dec = 2, ...)
object |
Return value from |
check |
Show table(s) for variables var1 and var2. "observed" for the observed frequencies table, "expected" for the expected frequencies table (i.e., frequencies that would be expected if the null hypothesis holds), "chi_sq" for the contribution to the overall chi-squared statistic for each cell (i.e., (o - e)^2 / e), "dev_std" for the standardized differences between the observed and expected frequencies (i.e., (o - e) / sqrt(e)), and "dev_perc" for the percentage difference between the observed and expected frequencies (i.e., (o - e) / e) |
dec |
Number of decimals to show |
... |
further arguments passed to or from other methods. |
See https://radiant-rstats.github.io/docs/basics/cross_tabs.html for an example in Radiant
cross_tabs to calculate results
plot.cross_tabs to plot results
result <- cross_tabs(newspaper, "Income", "Newspaper") summary(result, check = c("observed", "expected", "chi_sq"))result <- cross_tabs(newspaper, "Income", "Newspaper") summary(result, check = c("observed", "expected", "chi_sq"))
Summary method for the goodness function
## S3 method for class 'goodness' summary(object, check = "", dec = 2, ...)## S3 method for class 'goodness' summary(object, check = "", dec = 2, ...)
object |
Return value from |
check |
Show table(s) for the selected variable (var). "observed" for the observed frequencies table, "expected" for the expected frequencies table (i.e., frequencies that would be expected if the null hypothesis holds), "chi_sq" for the contribution to the overall chi-squared statistic for each cell (i.e., (o - e)^2 / e), "dev_std" for the standardized differences between the observed and expected frequencies (i.e., (o - e) / sqrt(e)), and "dev_perc" for the percentage difference between the observed and expected frequencies (i.e., (o - e) / e) |
dec |
Number of decimals to show |
... |
further arguments passed to or from other methods. |
See https://radiant-rstats.github.io/docs/basics/goodness for an example in Radiant
goodness to calculate results
plot.goodness to plot results
result <- goodness(newspaper, "Income", c(.3, .7)) summary(result, check = c("observed", "expected", "chi_sq")) goodness(newspaper, "Income", c(1 / 3, 2 / 3)) %>% summary("observed")result <- goodness(newspaper, "Income", c(.3, .7)) summary(result, check = c("observed", "expected", "chi_sq")) goodness(newspaper, "Income", c(1 / 3, 2 / 3)) %>% summary("observed")
Summary method for the probability calculator (binomial)
## S3 method for class 'prob_binom' summary(object, type = "values", ...)## S3 method for class 'prob_binom' summary(object, type = "values", ...)
object |
Return value from |
type |
Probabilities ("probs") or values ("values") |
... |
further arguments passed to or from other methods |
See https://radiant-rstats.github.io/docs/basics/prob_calc.html for an example in Radiant
prob_binom to calculate results
plot.prob_binom to plot results
result <- prob_binom(n = 10, p = 0.3, ub = 3) summary(result, type = "values")result <- prob_binom(n = 10, p = 0.3, ub = 3) summary(result, type = "values")
Summary method for the probability calculator (Chi-squared distribution)
## S3 method for class 'prob_chisq' summary(object, type = "values", ...)## S3 method for class 'prob_chisq' summary(object, type = "values", ...)
object |
Return value from |
type |
Probabilities ("probs") or values ("values") |
... |
further arguments passed to or from other methods |
See https://radiant-rstats.github.io/docs/basics/prob_calc.html for an example in Radiant
prob_chisq to calculate results
plot.prob_chisq to plot results
result <- prob_chisq(df = 1, ub = 3.841) summary(result, type = "values")result <- prob_chisq(df = 1, ub = 3.841) summary(result, type = "values")
Summary method for the probability calculator (discrete)
## S3 method for class 'prob_disc' summary(object, type = "values", ...)## S3 method for class 'prob_disc' summary(object, type = "values", ...)
object |
Return value from |
type |
Probabilities ("probs") or values ("values") |
... |
further arguments passed to or from other methods |
See https://radiant-rstats.github.io/docs/basics/prob_calc.html for an example in Radiant
prob_disc to calculate results
plot.prob_disc to plot results
result <- prob_disc(v = 1:6, p = c(2 / 6, 2 / 6, 1 / 12, 1 / 12, 1 / 12, 1 / 12), pub = 0.95) summary(result, type = "probs")result <- prob_disc(v = 1:6, p = c(2 / 6, 2 / 6, 1 / 12, 1 / 12, 1 / 12, 1 / 12), pub = 0.95) summary(result, type = "probs")
Summary method for the probability calculator (exponential)
## S3 method for class 'prob_expo' summary(object, type = "values", ...)## S3 method for class 'prob_expo' summary(object, type = "values", ...)
object |
Return value from |
type |
Probabilities ("probs") or values ("values") |
... |
further arguments passed to or from other methods |
See https://radiant-rstats.github.io/docs/basics/prob_calc.html for an example in Radiant
prob_expo to calculate results
plot.prob_expo to plot results
result <- prob_expo(rate = 1, ub = 2.996) summary(result, type = "values")result <- prob_expo(rate = 1, ub = 2.996) summary(result, type = "values")
Summary method for the probability calculator (F-distribution)
## S3 method for class 'prob_fdist' summary(object, type = "values", ...)## S3 method for class 'prob_fdist' summary(object, type = "values", ...)
object |
Return value from |
type |
Probabilities ("probs") or values ("values") |
... |
further arguments passed to or from other methods |
See https://radiant-rstats.github.io/docs/basics/prob_calc.html for an example in Radiant
prob_fdist to calculate results
plot.prob_fdist to plot results
result <- prob_fdist(df1 = 10, df2 = 10, ub = 2.978) summary(result, type = "values")result <- prob_fdist(df1 = 10, df2 = 10, ub = 2.978) summary(result, type = "values")
Summary method for the probability calculator (log normal)
## S3 method for class 'prob_lnorm' summary(object, type = "values", ...)## S3 method for class 'prob_lnorm' summary(object, type = "values", ...)
object |
Return value from |
type |
Probabilities ("probs") or values ("values") |
... |
further arguments passed to or from other methods |
See https://radiant-rstats.github.io/docs/basics/prob_calc.html for an example in Radiant
prob_lnorm to calculate results
plot.prob_lnorm to summarize results
result <- prob_lnorm(meanlog = 0, sdlog = 1, lb = 0, ub = 1) summary(result, type = "values")result <- prob_lnorm(meanlog = 0, sdlog = 1, lb = 0, ub = 1) summary(result, type = "values")
Summary method for the probability calculator (normal)
## S3 method for class 'prob_norm' summary(object, type = "values", ...)## S3 method for class 'prob_norm' summary(object, type = "values", ...)
object |
Return value from |
type |
Probabilities ("probs") or values ("values") |
... |
further arguments passed to or from other methods |
See https://radiant-rstats.github.io/docs/basics/prob_calc.html for an example in Radiant
prob_norm to calculate results
plot.prob_norm to plot results
result <- prob_norm(mean = 0, stdev = 1, ub = 0) summary(result)result <- prob_norm(mean = 0, stdev = 1, ub = 0) summary(result)
Summary method for the probability calculator (poisson)
## S3 method for class 'prob_pois' summary(object, type = "values", ...)## S3 method for class 'prob_pois' summary(object, type = "values", ...)
object |
Return value from |
type |
Probabilities ("probs") or values ("values") |
... |
further arguments passed to or from other methods |
See https://radiant-rstats.github.io/docs/basics/prob_calc.html for an example in Radiant
prob_pois to calculate results
plot.prob_pois to plot results
result <- prob_pois(lambda = 1, ub = 3) summary(result, type = "values")result <- prob_pois(lambda = 1, ub = 3) summary(result, type = "values")
Summary method for the probability calculator (t-distribution)
## S3 method for class 'prob_tdist' summary(object, type = "values", ...)## S3 method for class 'prob_tdist' summary(object, type = "values", ...)
object |
Return value from |
type |
Probabilities ("probs") or values ("values") |
... |
further arguments passed to or from other methods |
See https://radiant-rstats.github.io/docs/basics/prob_calc.html for an example in Radiant
prob_tdist to calculate results
plot.prob_tdist to plot results
result <- prob_tdist(df = 10, ub = 2.228) summary(result, type = "values")result <- prob_tdist(df = 10, ub = 2.228) summary(result, type = "values")
Summary method for the probability calculator (uniform)
## S3 method for class 'prob_unif' summary(object, type = "values", ...)## S3 method for class 'prob_unif' summary(object, type = "values", ...)
object |
Return value from |
type |
Probabilities ("probs") or values ("values") |
... |
further arguments passed to or from other methods |
See https://radiant-rstats.github.io/docs/basics/prob_calc.html for an example in Radiant
prob_unif to calculate results
plot.prob_unif to plot results
result <- prob_unif(min = 0, max = 1, ub = 0.3) summary(result, type = "values")result <- prob_unif(min = 0, max = 1, ub = 0.3) summary(result, type = "values")
Summary method for the single_mean function
## S3 method for class 'single_mean' summary(object, dec = 3, ...)## S3 method for class 'single_mean' summary(object, dec = 3, ...)
object |
Return value from |
dec |
Number of decimals to show |
... |
further arguments passed to or from other methods |
See https://radiant-rstats.github.io/docs/basics/single_mean.html for an example in Radiant
single_mean to generate the results
plot.single_mean to plot results
result <- single_mean(diamonds, "price") summary(result) diamonds %>% single_mean("price") %>% summary()result <- single_mean(diamonds, "price") summary(result) diamonds %>% single_mean("price") %>% summary()
Summary method for the single_prop function
## S3 method for class 'single_prop' summary(object, dec = 3, ...)## S3 method for class 'single_prop' summary(object, dec = 3, ...)
object |
Return value from |
dec |
Number of decimals to show |
... |
further arguments passed to or from other methods |
See https://radiant-rstats.github.io/docs/basics/single_prop.html for an example in Radiant
single_prop to generate the results
plot.single_prop to plot the results
result <- single_prop(titanic, "survived", lev = "Yes", comp_value = 0.5, alternative = "less") summary(result)result <- single_prop(titanic, "survived", lev = "Yes", comp_value = 0.5, alternative = "less") summary(result)