Package 'vibass'

Title: Valencia International Bayesian Summer School
Description: Materials for the introductory course on Bayesian inference. Practicals, data and interactive apps.
Authors: VIBASS7 [aut], Facundo Muñoz [ctb, cre] (Cirad, Package developer, <https://orcid.org/0000-0002-5061-4241>), Carmen Armero [ctb] (Universitat de València), Anabel Forte [ctb] (Universitat de València), David Conesa [ctb] (Universitat de València), Mark Brewer [ctb] (Biomathematics and Statistics Scotland (BioSS), <https://orcid.org/0000-0001-7559-389X>), Virgilio Gómez-Rubio [ctb] (Universidad Castilla-La Mancha)
Maintainer: Facundo Muñoz <[email protected]>
License: GPL-3
Version: 0.0.55
Built: 2024-11-12 05:14:55 UTC
Source: https://github.com/VABAR/vibass

Help Index


List available apps in {vibass} package.

Description

App codes that are available for use in [vibass_app()].

Usage

available_apps()

Value

Character vector.

Examples

available_apps()

Print a standardised summary table

Description

Make a table of several summary statistics with proper formatting.

Usage

summary_table(
  mean,
  var,
  quant,
  ic95 = NULL,
  prop0 = NULL,
  prop1 = NULL,
  label,
  digits = 2,
  ...
)

Arguments

mean

Real.

var

Real.

quant

Named numeric vector. Names must be of the form "xx numeric xx. As from the output of the function quantile.

ic95

Numeric vector.

prop0

Real.

prop1

Real.

label

Character. Name of the summarised variable.

digits

Integer. Number of decimal places to be used.

...

Passed to knitr::kable().

Details

The table includes the mean, variance and standard deviation, a vector of 3 quantiles at 0.05, 0.50 and 0.95, a 95 numeric value to be interpreted as a proportion above 0 and 1. All values are rounded to the specified number of decimal places.

Value

A knitr_kable object.

Examples

summary_table(mean = 1, var = 1, quant = quantile(1:10, 0:4/4), ic95 = 4:5,
prop1 = .6, label = "test")

Return text in a contrasting colour

Description

Overcome default colouring schemes (e.g. for packageStartupMessages()) and make sure some text is printed in a contrasting colour depending on the theme (dark or light) in RStudio.

Usage

text_col(x)

Arguments

x

Character. Text to print.

Details

Uses cli for printing white text in dark themes or black text on light themes in RStudio. Borrowed from package tidyverse (https://github.com/tidyverse/tidyverse/blob/72af810106d7249c905d6b0f5b8b42dc33e6ac21/R/utils.R)

Examples

vibass:::text_col("Hello world")
message("Hello world")
message(vibass:::text_col("Hello world"))

VIBASS interactive apps.

Description

Launches the Shiny interactive applications for the practicals.

Usage

vibass_app(x = NULL)

Arguments

x

integer or character interpretable as integer. See [get_available_apps()] for valid options.


Weights of children

Description

Data for the VIBASS session on linear models. This is a simulated dataset that includes data about children. The variables in the dataset are:

Usage

data("Weights")

Format

An object of class "data.frame".

Details

  • age. Age (in years).

  • vegetables. Measure of vegetables consumption.

  • weight. Weight (in kg).

  • sex. Girl or Boy.

  • height. Height (in cm).

  • ethnicity Asian, Black or European.

Source

VIBASS Team.

Examples

data(Weights)
summary(Weights)

# ML estimates
lmW <- lm(weight ~ age, data = Weights)
summary(lmW)