Title: | Functionality and Data for the Aalto Course on Bayesian Data Analysis |
---|---|
Description: | Functionality and Data for the Aalto University Course on Bayesian Data Analysis. |
Authors: | Aki Vehtari |
Maintainer: | Aki Vehtari <[email protected]> |
License: | MIT + file LICENCE |
Version: | 0.3.2 |
Built: | 2024-11-20 10:26:23 UTC |
Source: | https://github.com/avehtari/BDA_course_Aalto |
Algae data set. The data contains the status of algae in 274 measurement sites in Finnish lakes and rivers.
algae
algae
A vector with 274 elements:
Algae present
No algae present
Bioassay data set. Taken from Table 3.1 in the BDA book
bioassay
bioassay
A data frame with 4 rows and 3 variables:
dose [log g/ml]
number of animals
number of deaths
Sample from the posterior of the bioassay model.
bioassay_posterior
bioassay_posterior
A data frame with 1000 rows and 2 variables:
Parameter of the bioassay model
Parameter of the bioassay model
Unnormalized log-posterior for bioassay, assuming uniform prior
bioassaylp(alpha, beta, x, y, n)
bioassaylp(alpha, beta, x, y, n)
alpha |
intercept parameter in the dose-response model (vector or single number) |
beta |
slope parameter in the dose-response model (vector or single number) |
x |
vector of doses for each observation |
y |
vector of number of deaths for each observation |
n |
vector of number of animals for each observation |
Computes the density of a multivariate normal distribution
dmvnorm(x, mean, sigma, log = FALSE)
dmvnorm(x, mean, sigma, log = FALSE)
x |
vector or matrix of values for which the density is computed.
If |
mean |
mean vector |
sigma |
covariance matrix |
log |
logical indicating whether to return on the log scale or not. False by default. |
Densities of the draws x.
drowning data set. The data contains the number of people who have drowned per year in Finland between 1980 and 2016.
drowning
drowning
A data frame with 37 rows and 2 variables:
year
number of drownings in Finland
factory data set. The data contains quality control measurements from 6 machines in a factory.
factory
factory
A data frame with 5 rows and 6 variables:
Machine 1
Machine 2
Machine 3
Machine 4
Machine 5
Machine 6
Kilpisjärvi data set. The data contains the Kilpisjärvi summer month temperatures 1952–2013. Kilpisjärvi is in very northern part of Finland. Data by Finnish Meteorological Institute (CC-BY 4.0). Name of the observation station in FMI database is "Enontekiö Kilpisjärvi kyläkeskus"
kilpisjarvi
kilpisjarvi
A data frame with 62 rows and 5 columns:
Year
Average temperature in June
Average temperature in July
Average temperature in August
Average temperature in July–August
Kilpisjärvi data set. The data contains the Kilpisjärvi summer month temperatures 1952–2022. Kilpisjärvi is in very northern part of Finland. Data by Finnish Meteorological Institute (CC-BY 4.0). Name of the observation station in FMI database is "Enontekiö Kilpisjärvi kyläkeskus"
kilpisjarvi2022
kilpisjarvi2022
A data frame with 71 rows and 5 columns:
Year
Average temperature in June
Average temperature in July
Average temperature in August
Average temperature in July–August
Implementation of log(1 / (1 + exp(-x))) robust to over- and under-flow
log_inv_logit(x)
log_inv_logit(x)
x |
numeric input |
Implementation of log(1 - 1 / (1 + exp(-x))) robust to over- and under-flow
log1m_inv_logit(x)
log1m_inv_logit(x)
x |
numeric input |
Computes MCSE for quantile estimates based on independent draws
mcse_quantile(draws, prob)
mcse_quantile(draws, prob)
draws |
Monte Carlo draws |
prob |
probability for which quantiles is computed |
Produces random draws from a multivariate normal distribution
rmvnorm(n, mean, sigma)
rmvnorm(n, mean, sigma)
n |
number of draws |
mean |
mean vector |
sigma |
covariance matrix |
Density, distribution function, quantile function and random generation for
the Student-t distribution with location/mean mean
, scale
scale
, and degrees of freedom df
. See
https://en.wikipedia.org/wiki/Location%E2%80%93scale_family for more details
on how to get from the standard t-distribution to the t-distribution with
additional location and scale parameters.
dtnew(x, df, mean = 0, scale = 1, log = FALSE) ptnew(q, df, mean = 0, scale = 1, lower.tail = TRUE, log.p = FALSE) qtnew(p, df, mean = 0, scale = 1) rtnew(n, df, mean = 0, scale = 1)
dtnew(x, df, mean = 0, scale = 1, log = FALSE) ptnew(q, df, mean = 0, scale = 1, lower.tail = TRUE, log.p = FALSE) qtnew(p, df, mean = 0, scale = 1) rtnew(n, df, mean = 0, scale = 1)
x , q
|
Vector of quantiles. |
df |
Vector of degrees of freedom. |
mean |
Vector of location/mean values. |
scale |
Vector of scale values. |
log , log.p
|
Logical; If |
lower.tail |
Logical; If |
p |
Vector of probabilities. |
n |
Number of samples to draw from the distribution. |
windshieldy1 data set. The data represents a sample of windshields whose hardness has been measured.
windshieldy1
windshieldy1
A vector with 9 elements
windshieldy2 data set. The data represents a sample of windshields whose hardness has been measured.
windshieldy2
windshieldy2
A vector with 13 elements