| ✓ |
:bambi |
escs |
escs |
|
Linear regression of illegal drug use on Big Five personality scores. Family: gaussian.
|
| — |
:bambi |
cherry_blossoms |
cherry_blossoms |
|
Spline basis regression of bloom day-of-year on year, with explicit intercept term in the basis expansion. Family: gaussian.
|
| — |
:bambi |
cherry_blossoms |
cherry_blossoms |
|
Spline basis regression of bloom day-of-year on year, with model intercept absorbed (not explicit in the basis). Family: gaussian.
|
| — |
:bambi |
dietox |
dietox |
|
Mixed-effects model of pig weight over time with random slope and intercept per pig. Family: gaussian.
|
| — |
:bambi |
sleepstudy |
sleepstudy |
|
Mixed-effects model of reaction time on days of sleep deprivation with random slope and intercept per subject. Family: gaussian.
|
| — |
:bambi |
radon |
radon |
|
Complete pooling model: single intercept per floor type, ignoring county structure. Family: gaussian.
|
| — |
:bambi |
radon |
radon |
|
No-pooling model: separate intercept for each county-floor combination. Family: gaussian.
|
| — |
:bambi |
radon |
radon |
|
Partial pooling with random county intercepts, no floor predictor. Family: gaussian.
|
| — |
:bambi |
radon |
radon |
|
Partial pooling with floor as fixed effect and random county intercepts. Family: gaussian.
|
| — |
:bambi |
radon |
radon |
|
Partial pooling with random slope and intercept for floor by county. Family: gaussian.
|
| — |
:bambi |
radon |
radon |
|
Partial pooling with floor and county-level uranium predictor (log_u). Family: gaussian.
|
| — |
:bambi |
strack_rrr |
strack_rrr |
|
Simple model with condition as fixed effect and random participant intercepts. Family: gaussian.
|
| — |
:bambi |
strack_rrr |
strack_rrr |
|
Full model with condition, age, gender, random participant intercepts, and crossed random effects for study and stimulus. Family: gaussian.
|
| — |
:bambi |
shooter |
shooter |
|
Reaction rate modeled by race × object interaction with crossed random effects per subject, without target random effects. Family: gaussian.
|
| — |
:bambi |
shooter |
shooter |
|
Reaction rate modeled by race × object interaction with crossed random effects for both subject and target. Family: gaussian.
|
| — |
:bambi |
shooter |
shooter |
|
Binary shoot/don't-shoot decision modeled by race × object interaction with crossed random effects for subject and target. Family: bernoulli.
|
| — |
:bambi |
fixed_random |
fixed_random |
|
Naive logistic regression ignoring group structure entirely. Family: bernoulli.
|
| — |
:bambi |
fixed_random |
fixed_random |
|
Fixed effects logistic regression with a dummy indicator per group. Family: bernoulli.
|
| — |
:bambi |
fixed_random |
fixed_random |
|
Multilevel logistic regression with random group intercepts. Family: bernoulli.
|
| — |
:bambi |
fixed_random |
fixed_random |
|
Mundlak machine: random intercepts plus group-mean of x to separate within/between effects. Family: bernoulli.
|
| — |
:bambi |
t_regression |
t_regression |
|
Standard linear regression on data with outliers; used as baseline. Family: gaussian.
|
| — |
:bambi |
t_regression |
t_regression |
|
Robust linear regression using Student's t family, which down-weights outliers. Family: t.
|
| — |
:bambi |
predict_new_groups |
predict_new_groups |
|
Mixed-effects model predicting FVC with random slopes per patient; demonstrates out-of-sample prediction for new groups. Family: gaussian.
|
| — |
:bambi |
polynomial_regression |
poly_falling |
|
Polynomial regression using inline transformation I(t**2) to recover gravitational constant from falling ball data. Family: gaussian.
|
| — |
:bambi |
polynomial_regression |
poly_falling |
|
Same as :polyfallingexplicit but using Bambi's alternative curly-brace inline transformation syntax. Family: gaussian.
|
| — |
:bambi |
polynomial_regression |
poly_falling |
|
Polynomial regression using a pre-computed tsquared column rather than inline transformation. Family: gaussian.
|
| — |
:bambi |
polynomial_regression |
poly_projectile |
|
Explicit quadratic polynomial regression on projectile data with both linear and quadratic terms. Family: gaussian.
|
| — |
:bambi |
polynomial_regression |
poly_projectile |
|
Quadratic polynomial regression using Bambi's poly() function with raw (non-orthogonal) polynomials. Family: gaussian.
|
| — |
:bambi |
polynomial_regression |
poly_planets |
|
Planet-specific quadratic coefficient interacted with Planet to recover different gravitational constants per planet. Family: gaussian.
|
| — |
:bambi |
logistic_anes |
logistic_anes |
|
Logistic regression of Clinton vote on party ID and party-age interaction. Family: bernoulli.
|
| — |
:bambi |
model_comparison |
model_comparison |
|
Linear logistic regression of income on sex, race, age, and weekly hours worked. Family: bernoulli.
|
| — |
:bambi |
model_comparison |
model_comparison |
|
Quadratic logistic regression adding squared age and hours terms. Family: bernoulli.
|
| — |
:bambi |
model_comparison |
model_comparison |
|
Cubic logistic regression adding cubic age and hours terms. Family: bernoulli.
|
| — |
:bambi |
hierarchical_binomial |
hierarchical_binomial |
|
Non-hierarchical binomial model: separate intercept per player. Family: binomial.
|
| — |
:bambi |
hierarchical_binomial |
hierarchical_binomial |
|
Hierarchical binomial model with random player intercepts. Family: binomial.
|
| — |
:bambi |
alternative_links |
alternative_links |
|
Binomial regression with logit link (default). Family: binomial, link="logit".
|
| — |
:bambi |
alternative_links |
alternative_links |
|
Binomial regression with probit link. Family: binomial, link="probit".
|
| — |
:bambi |
alternative_links |
alternative_links |
|
Binomial regression with complementary log-log link. Family: binomial, link="cloglog".
|
| — |
:bambi |
wald_gamma |
wald_gamma |
|
Wald (inverse Gaussian) regression of claim costs on age category (as categorical), gender and area. Family: wald, link="log".
|
| — |
:bambi |
wald_gamma |
wald_gamma |
|
Gamma regression of claim costs on age category (numeric), gender and area. Family: gamma, link="log".
|
| — |
:bambi |
negative_binomial |
negative_binomial |
|
Negative binomial regression of student absences on program type and math score. Family: negativebinomial.
|
| — |
:bambi |
negative_binomial |
negative_binomial |
|
Negative binomial regression adding program-by-math interaction term. Family: negativebinomial.
|
| — |
:bambi |
count_roaches |
count_roaches |
|
Poisson regression of roach counts with log-exposure offset. Family: poisson.
|
| — |
:bambi |
count_roaches |
count_roaches |
|
Negative binomial regression of roach counts with log-exposure offset; accounts for overdispersion relative to Poisson. Family: negativebinomial.
|
| — |
:bambi |
beta_regression |
beta_probs |
|
Intercept-only beta regression on synthetic probability data. Family: beta.
|
| — |
:bambi |
beta_regression |
beta_coin |
|
Beta regression of probability on coin dirt differential. Family: beta.
|
| — |
:bambi |
beta_regression |
beta_batting |
|
Intercept-only beta regression on baseball batting averages. Family: beta.
|
| — |
:bambi |
beta_regression |
beta_batting |
|
Beta regression of batting average on prior-year batting average. Family: beta.
|
| — |
:bambi |
categorical_regression |
categorical_toy |
|
Categorical regression on three Gaussian classes. Family: categorical.
|
| — |
:bambi |
categorical_regression |
categorical_regression |
|
Categorical regression predicting iris species from morphological measurements. Family: categorical.
|
| — |
:bambi |
categorical_regression |
categorical_alligator |
|
Categorical regression of alligator food choice on body length and sex. Family: categorical.
|
| — |
:bambi |
circular_regression |
circular_regression |
|
Circular regression of periwinkle direction on distance using von Mises distribution. Family: vonmises.
|
| — |
:bambi |
circular_regression |
circular_regression |
|
Gaussian regression of circular direction data; used as a misspecified comparison model against the von Mises. Family: gaussian.
|
| — |
:bambi |
quantile_regression |
quantile_regression |
|
Spline regression targeting the 10th percentile of BMI. Family: asymmetriclaplace, kappa=0.1.
|
| — |
:bambi |
quantile_regression |
quantile_regression |
|
Spline regression targeting the 50th percentile (median) of BMI. Family: asymmetriclaplace, kappa=0.5.
|
| — |
:bambi |
quantile_regression |
quantile_regression |
|
Spline regression targeting the 90th percentile of BMI. Family: asymmetriclaplace, kappa=0.9.
|
| — |
:bambi |
quantile_regression |
quantile_regression |
|
Spline regression using Gaussian family; used as comparison model to quantile approach. Family: gaussian.
|
| — |
:bambi |
mister_p |
mister_p |
|
Multilevel binomial regression with crossed random effects for state, ethnicity, education and interactions; used for post-stratification. Family: binomial.
|
| — |
:bambi |
zero_inflated |
zero_inflated |
|
ZIP mu component: models the expected count given non-zero. Family: zeroinflatedpoisson.
|
| — |
:bambi |
zero_inflated |
zero_inflated |
|
ZIP psi component: models the probability of excess zeros. Family: zeroinflatedpoisson.
|
| — |
:bambi |
zero_inflated |
zero_inflated |
|
Hurdle Poisson mu component: models the expected count given positive. Family: hurdle_poisson.
|
| — |
:bambi |
zero_inflated |
zero_inflated |
|
Hurdle Poisson psi component: models the probability of a non-zero outcome. Family: hurdle_poisson.
|
| — |
:bambi |
ordinal_regression |
ordinal_regression |
|
Cumulative ordinal model with only threshold parameters, no predictors. Family: cumulative.
|
| — |
:bambi |
ordinal_regression |
ordinal_regression |
|
Cumulative ordinal model with action, intention, contact and their interactions. Family: cumulative.
|
| — |
:bambi |
ordinal_regression |
hr_attrition |
|
Sequential ratio (sratio) ordinal model predicting years at company from total working years. Family: sratio.
|
| — |
:bambi |
distributional_models |
distributional_synth |
|
Gamma regression with a single (constant) shape parameter alpha. Family: gamma.
|
| — |
:bambi |
distributional_models |
distributional_synth |
|
Distributional gamma regression: compound formula models both mu and alpha as functions of x. Family: gamma.
|
| — |
:bambi |
distributional_models |
distributional_models |
|
Distributional gamma regression on hourly bike count data; both mu and alpha modeled with spline basis functions. Family: gamma.
|
| — |
:bambi |
hsgp_1d |
hsgp_1d |
|
Hilbert-space Gaussian process approximation on 1D synthetic data. Family: gaussian.
|
| — |
:bambi |
hsgp_1d |
hsgp_1d |
|
HSGP with centered parameterization on 1D synthetic data. Family: gaussian.
|
| — |
:bambi |
hsgp_1d |
gam_data |
|
HSGP on GAM data with group-specific processes sharing covariance parameters. Family: gaussian.
|
| — |
:bambi |
hsgp_1d |
gam_data |
|
HSGP on GAM data with group-specific processes and independent covariance parameters. Family: gaussian.
|
| — |
:bambi |
hsgp_2d |
hsgp_2d |
|
Isotropic 2D Hilbert-space Gaussian process on synthetic data. Family: gaussian.
|
| — |
:bambi |
hsgp_2d |
hsgp_2d |
|
2D HSGP with group-specific processes sharing covariance parameters. Family: gaussian.
|
| — |
:bambi |
hsgp_2d |
hsgp_2d |
|
2D HSGP with group-specific processes and independent covariance parameters. Family: gaussian.
|
| — |
:bambi |
hsgp_2d |
hsgp_2d |
|
Anisotropic 2D HSGP allowing different length scales per dimension. Family: gaussian.
|
| — |
:bambi |
hsgp_2d |
poisson_data |
|
Poisson regression combining fixed effects, random site intercepts, and a 2D spatial HSGP term varying by year. Family: poisson.
|
| — |
:bambi |
survival_model |
survival_model |
|
Exponential survival model with only an intercept (constant hazard). Family: exponential, link="log".
|
| — |
:bambi |
survival_model |
survival_model |
|
Exponential survival model with cat color as a predictor. Family: exponential, link="log".
|
| — |
:bambi |
survival_discrete_time |
survival_discrete_time |
|
Bernoulli survival model with complementary log-log link on synthetic discrete-time data. Family: bernoulli, link="cloglog".
|
| — |
:bambi |
survival_discrete_time |
child_mortality |
|
Binomial discrete-time survival model on Swedish child mortality data. Family: binomial, link="cloglog".
|
| — |
:bambi |
survival_discrete_time |
child_mortality |
|
Binomial discrete-time survival with spline baseline hazard. Family: binomial, link="cloglog".
|
| — |
:bambi |
survival_discrete_time |
child_mortality |
|
Poisson formulation of discrete-time survival with log-offset for person-time. Family: poisson.
|
| — |
:bambi |
survival_continuous_time |
survival_continuous_time |
|
Weibull survival model on synthetic data with treatment and age effects. Family: weibull.
|
| — |
:bambi |
survival_continuous_time |
retention |
|
Weibull survival model of employee tenure with fixed effects only. Family: weibull.
|
| — |
:bambi |
survival_continuous_time |
retention |
|
Weibull survival model of employee tenure with random intercepts for field. Family: weibull.
|
| — |
:bambi |
orthogonal_polynomial |
orthopoly_projectile |
|
Explicit (raw) quadratic polynomial on projectile data. Family: gaussian.
|
| — |
:bambi |
orthogonal_polynomial |
orthopoly_projectile |
|
Orthogonal polynomial degree 2 on projectile data. Family: gaussian.
|
| — |
:bambi |
orthogonal_polynomial |
orthogonal_polynomial |
|
Linear regression of fuel efficiency on horsepower; baseline model. Family: gaussian.
|
| — |
:bambi |
orthogonal_polynomial |
orthogonal_polynomial |
|
Orthogonal polynomial degree 2 regression of mpg on horsepower. Family: gaussian.
|
| — |
:bambi |
orthogonal_polynomial |
orthogonal_polynomial |
|
Orthogonal polynomial regression template for degree ∈ 1:9; used for model comparison. Family: gaussian.
|
| — |
:bambi |
plot_predictions |
plot_predictions |
|
Linear regression of fuel efficiency on horsepower, weight, cylinders and gear. Family: gaussian.
|
| — |
:bambi |
plot_predictions |
negative_binomial |
|
Negative binomial regression of student absences; dataset requires Stata loading (see :negative_binomial). Placeholder DataFrame() used here. Family: negativebinomial.
|
| — |
:bambi |
plot_predictions |
plot_pred_movies |
|
Logistic regression of "certified fresh" rating on film length and genre style. Family: bernoulli.
|
| — |
:bambi |
plot_predictions |
distributional_synth |
|
Distributional gamma regression on synthetic data; same model as :distributionalvaralpha. Family: gamma.
|
| — |
:bambi |
plot_comparisons |
plot_comparisons |
|
Zero-inflated Poisson model of fish catch count. Family: zeroinflatedpoisson.
|
| — |
:bambi |
plot_comparisons |
titanic |
|
Logistic regression of Titanic survival on passenger class, sex and age with interactions. Family: bernoulli.
|
| — |
:bambi |
plot_slopes |
plot_slopes |
|
Logistic regression of well-switching on distance, arsenic level and education. Family: bernoulli.
|
| — |
:bambi |
plot_slopes |
plot_slopes |
|
Logistic regression adding education interaction terms with distance and arsenic. Family: bernoulli.
|
| — |
:bambi |
alternative_samplers |
alternative_samplers |
|
Linear regression on synthetic data; demonstrates blackjax, numpyro and nutpie backends. Family: gaussian.
|
| — |
:brms |
cbpp |
cbpp |
|
Standard binomial GLMM for contagious bovine pleuropneumonia incidence across 4 periods.
|
| — |
:brms |
cbpp |
cbpp |
|
Custom beta_binomial2 family; vint passes integer auxiliary data (herd size) to the custom family. Accounts for extra-binomial overdispersion.
|
| — |
:brms |
distreg |
distreg_dat1 |
|
Distributional model for both mean and log(sigma) as functions of group; demonstrates that the two groups differ in both location and scale.
|
| — |
:brms |
distreg |
distreg_fish |
|
Negative binomial model for fishing trip catch counts; no zero-inflation component.
|
| — |
:brms |
distreg |
distreg_fish |
|
Zero-inflated Poisson; zi sub-model predicts structural-zero probability from child.
|
| — |
:brms |
distreg |
distreg_gam |
|
Both mean and log(sigma) modeled as smooth splines; shared random group effects.
|
| — |
:brms |
nhanes |
nhanes |
|
Fit to multiply-imputed datasets via brm_multiple; standard regression template on complete cases from each imputed dataset.
|
| — |
:brms |
nhanes |
nhanes |
|
Joint model: simultaneously imputes chl while modelling bmi; mi() marks imputed variables; set_rescor(FALSE) removes residual correlations between equations.
|
| — |
:brms |
nhanes |
nhanes |
|
Variant: chl measured with known standard error se_chl; propagates measurement uncertainty into the joint imputation model.
|
| — |
:brms |
income |
income |
|
Monotonic main effect of ordered income; mo() constrains the response to be monotonically increasing or decreasing across ordered categories.
|
| — |
:brms |
income |
income |
|
Comparison: standard numeric predictor, ignoring the ordinal structure of income.
|
| — |
:brms |
income |
income |
|
Comparison: unordered factor coding, ignores both ordinal structure and monotonicity.
|
| — |
:brms |
income |
income |
|
Interaction of monotonic income effect with age group.
|
| — |
:brms |
income |
income |
|
Adds city-level random slopes for the monotonic income effect.
|
| — |
:brms |
btdata |
btdata |
|
Compact syntax: one formula for both responses; correlated random effects via shared labels p and q; set_rescor(TRUE) adds residual correlations.
|
| — |
:brms |
btdata |
btdata |
|
Equivalent explicit syntax with separate bf() per response; same model as :btdata_compact but with individually specified sub-formulas.
|
| — |
:brms |
btdata |
btdata |
|
Extended model: skew-normal family for tarsus, smooth spline for hatchdate in both sub-models.
|
| — |
:brms |
nonlinear |
nonlinear_dat |
|
Nonlinear exponential model; nl=TRUE enables custom nonlinear predictors; b1 + b2 ~ 1 declares both as intercept-only submodels.
|
| — |
:brms |
nonlinear |
nonlinear_dat |
|
Standard linear model on the same exponential-decay data; baseline comparison.
|
| — |
:brms |
nonlinear |
loss |
|
Nonlinear Weibull loss development curve; ult (ultimate loss) varies by accident year; omega = shape, theta = scale.
|
| — |
:brms |
phylogenetics |
phylo_simple |
|
Phylogenetic random effect only; A is the phylogenetic covariance matrix.
|
| — |
:brms |
phylogenetics |
phylo_simple |
|
Adds a species-level residual random effect on top of the phylogenetic effect; (1|phylo) captures species-specific deviations not explained by phylogeny.
|
| — |
:brms |
phylogenetics |
phylo_repeat |
|
Phylogenetic effect plus within-species random effect for 5 repeated observations per species.
|
| — |
:brms |
phylogenetics |
phylo_effect |
|
Meta-analytic model; known SE derived from N; se() passes known measurement error; random study intercept captures between-species heterogeneity.
|
| — |
:brms |
phylogenetics |
phylo_pois |
|
Poisson GLMM with phylogenetic random effect; models count phenotype data.
|
| — |
:mcelreath |
globe |
globe |
|
SR2 Ch 2–3syntheticgaussian
parseable
sampleable
Binomial likelihood for estimating p(water) from a globe-tossing experiment. family = binomial(link = "identity"); 0 + Intercept fixes the link to identity, estimating p directly.
|
| — |
:mcelreath |
howell1 |
howell1 |
|
Intercept-only Gaussian regression on adult heights (age >= 18, n=352). Used as a prior predictive / baseline model.
|
| — |
:mcelreath |
howell1 |
howell1 |
|
Simple linear regression of height on mean-centered weight in adults (age >= 18). weight_c = weight - mean(weight).
|
| — |
:mcelreath |
howell1 |
howell1 |
|
Quadratic polynomial regression of height on standardized weight using the full dataset (all ages). weight_s = standardized weight, weight_s2 = weight_s^2.
|
| — |
:mcelreath |
howell1 |
howell1 |
|
Cubic polynomial regression of height on standardized weight using the full dataset (all ages). weight_s3 = weight_s^3.
|
| — |
:mcelreath |
howell1 |
howell1 |
|
Nonlinear exponential growth model for height on mean-centered weight in adults (age >= 18). weight_c = weight - mean(weight).
|
| — |
:mcelreath |
howell1 |
howell1 |
|
Lognormal nonlinear model treating body weight as a scaled cylinder. w = weight, h = height. Models body weight as a scaled cylinder volume.
|
| — |
:mcelreath |
cherry_blossoms |
cherry_blossoms |
|
B is a B-spline basis matrix (each column is a basis function); constructed via bs(year, knots=iknots) in R with ~17 basis columns.
|
| — |
:mcelreath |
waffle_divorce |
waffle_divorce |
|
Simple regression of standardized divorce rate on standardized median age at marriage. D = standardized Divorce, A = standardized MedianAgeMarriage.
|
| — |
:mcelreath |
waffle_divorce |
waffle_divorce |
|
Simple regression of standardized divorce rate on standardized marriage rate. D = standardized Divorce, M = standardized Marriage.
|
| — |
:mcelreath |
waffle_divorce |
waffle_divorce |
|
Multiple regression; M's effect vanishes after conditioning on A, revealing a spurious association between marriage rate and divorce.
|
| — |
:mcelreath |
waffle_divorce |
waffle_divorce |
|
Mediator regression: age at marriage predicts marriage rate. Part of the causal model where A -> M -> D and A -> D.
|
| — |
:mcelreath |
waffle_divorce |
waffle_divorce |
|
Multivariate brms model; simultaneous causal model for D and M with residual correlation disabled via set_rescor(FALSE).
|
| — |
:mcelreath |
waffle_divorce |
waffle_divorce |
|
Measurement error model from Ch 15; D_sd is the known standard error of the divorce estimate (approximated as 0.1 * |D| + 0.01). D_obs is the noisy observation.
|
| — |
:mcelreath |
milk |
milk |
|
Positive association between neocortex percentage and kcal per gram before controlling for body mass. Uses complete cases (n=12) with non-missing neocortex.perc.
|
| — |
:mcelreath |
milk |
milk |
|
Negative association; larger species produce less calorie-dense milk. Uses complete cases (n=12) with non-missing neocortex.perc.
|
| — |
:mcelreath |
milk |
milk |
|
Both effects revealed simultaneously — the masked association. Uses complete cases (n=12) with non-missing neocortex.perc.
|
| — |
:mcelreath |
milk |
milk |
|
Clade index model with one intercept per primate clade, no overall intercept. Uses complete cases (n=12) with non-missing neocortex.perc.
|
| — |
:mcelreath |
milk |
milk |
|
Joint missing-data model from Ch 15; b = neocortex.perc with missing values treated as partially observed. Uses the full dataset (all 29 species, including those with missing neocortex data).
|
| — |
:mcelreath |
plant_growth |
plant_growth |
|
SR2 Ch 6syntheticgaussian
parseable
sampleable
Baseline model with no treatment effect. Growth proportional to initial height.
|
| — |
:mcelreath |
plant_growth |
plant_growth |
|
SR2 Ch 6syntheticgaussian
parseable
sampleable
Post-treatment bias: treatment effect absorbed by conditioning on fungus (a mediator). Including fungus blocks the path from treatment to h1.
|
| — |
:mcelreath |
plant_growth |
plant_growth |
|
SR2 Ch 6syntheticgaussian
parseable
sampleable
Causal model: treatment effect recovered by excluding fungus (the mediator). This gives an unbiased estimate of the total effect of treatment on growth.
|
| — |
:mcelreath |
happiness |
happiness |
|
SR2 Ch 6syntheticgaussian
parseable
sampleable
mid = marriage as index; conditioning on marriage (a collider) induces a spurious negative association between age and happiness.
|
| — |
:mcelreath |
happiness |
happiness |
|
SR2 Ch 6syntheticgaussian
parseable
sampleable
No conditioning on marriage; age has no direct effect on happiness in this causal model.
|
| — |
:mcelreath |
rugged |
rugged |
|
Pooled model ignoring continent. log_gdp_std = log GDP standardized to mean, rugged_std_c = ruggedness standardized and centered.
|
| — |
:mcelreath |
rugged |
rugged |
|
Continent intercepts via index cid; same ruggedness slope for Africa and Other. cid = "Africa" or "Other".
|
| — |
:mcelreath |
rugged |
rugged |
|
Continent-specific intercepts AND slopes; ruggedness hurts GDP outside Africa but helps within Africa.
|
| — |
:mcelreath |
tulips |
tulips |
|
Additive model; water_cent and shade_cent are mean-centered. No interaction term.
|
| — |
:mcelreath |
tulips |
tulips |
|
Interaction model: the effect of water on blooms depends on shade level.
|
| — |
:mcelreath |
hetero |
hetero |
|
SR2 Ch 10syntheticgaussian
parseable
sampleable
Distributional model: both mean and log(sigma) have their own sub-models. sigma grows with x, producing heteroscedastic residuals.
|
| — |
:mcelreath |
chimpanzees |
chimpanzees |
|
Intercept-only binomial; baseline probability of pulling left across all actors and treatments.
|
| — |
:mcelreath |
chimpanzees |
chimpanzees |
|
Actor-indexed intercepts plus treatment effects; no pooling across actors.
|
| — |
:mcelreath |
chimpanzees |
chimpanzees |
|
Multilevel model with partial pooling across actors and blocks. Adaptive regularization via hierarchical priors on actor and block intercepts.
|
| — |
:mcelreath |
chimpanzees |
chimpanzees |
|
Varying slopes; each actor and block has its own treatment-effect vector.
|
| — |
:mcelreath |
ucbadmit |
ucbadmit |
|
gid = gender index; apparent gender gap in admission rates before conditioning on department.
|
| — |
:mcelreath |
ucbadmit |
ucbadmit |
|
Gender and department effects; gender gap disappears after conditioning on department (Simpson's paradox).
|
| — |
:mcelreath |
ucbadmit |
ucbadmit |
|
Custom beta-binomial family from Ch 12; vint passes integer auxiliary data (applications count).
|
| — |
:mcelreath |
kline |
kline |
|
Intercept-only Poisson (log link); baseline tool count model.
|
| — |
:mcelreath |
kline |
kline |
|
Contact-index intercepts and slopes on log-population. cid = contact level (high/low).
|
| — |
:mcelreath |
kline |
kline |
|
Scientific power-law model with identity link; a, b vary by contact level cid.
|
| — |
:mcelreath |
kline2 |
kline2 |
|
Power-law model where a has a Gaussian process prior over geographic coordinates (latitude and longitude). Requires Kline2 dataset.
|
| — |
:mcelreath |
trolley |
trolley |
|
Intercept-only cumulative ordinal model; 6 thresholds estimated for the 7-point response scale.
|
| — |
:mcelreath |
trolley |
trolley |
|
Action, contact, and intention effects (with interactions) on moral acceptability ratings.
|
| — |
:mcelreath |
trolley |
trolley |
|
Monotonic effect of ordered education; edu_new = integer-coded edu (1–8). mo() constrains the effect to be monotonically increasing.
|
| — |
:mcelreath |
reedfrogs |
reedfrogs |
|
No-pooling model; one parameter per tank. Each tank gets its own intercept with no sharing of information.
|
| — |
:mcelreath |
reedfrogs |
reedfrogs |
|
Partial pooling; adaptive regularization via multilevel model. Tank-level intercepts share a common hyperprior.
|
| — |
:mcelreath |
cafe |
cafe |
|
SR2 Ch 14syntheticgaussian
parseable
sampleable
Varying intercepts AND slopes; café-level covariance between them. The afternoon effect on wait time differs across cafés.
|
| — |
:mcelreath |
primates301 |
primates301 |
|
Brain size ~ body mass + group size; phylogeny ignored. All variables log-standardized.
|
| — |
:mcelreath |
primates301 |
primates301 |
|
Same as OLS model plus phylogenetic correlation matrix R passed via data2. R is built from a phylogenetic tree, e.g. via ape::vcv.phylo().
|
| — |
:mcelreath |
moralizing_gods |
moralizing_gods |
|
Do moralizing gods predict / follow the emergence of writing? Rows with missing moralizing_gods or writing are dropped.
|
| — |
:mcelreath |
panda_nuts |
panda_nuts |
|
poisson(link = identity); n_panda = success; phi = asymptotic rate, k = growth rate, theta = shape; age_s = standardized age.
|
| — |
:mcelreath |
lynx_hare |
lynx_hare |
|
AR(1) autoregressive model for hare population using the full dataset (missings present in lag variables).
|
| — |
:mcelreath |
lynx_hare |
lynx_hare |
|
Equivalent lag-1 regression; Hare_1 = lag of Hare. Uses dropmissing dataset (d2, n=20).
|
| — |
:mcelreath |
lynx_hare |
lynx_hare |
|
Treating lagged Hare as partially observed/missing. Uses the full dataset with first-row Hare_1 as missing.
|
| — |
:mcelreath |
lynx_hare |
lynx_hare |
|
Bivariate VAR(1); lognormal family. Lynx feeds back on Hare. Uses dropmissing dataset (d2, n=20).
|
| — |
:mcelreath |
btdata |
btdata |
|
Intercept-only multivariate model; establishes baseline residual correlation between tarsus length and back coloration.
|
| — |
:mcelreath |
btdata |
btdata |
|
Full model; p/q labels allow correlated random effects across responses. Sex and hatch date as fixed effects; foster nest and dam as random effects.
|
| — |
:mcelreath |
btdata |
btdata |
|
Adds sex × hatchdate interaction to the full model.
|
| — |
:kruschke |
z15n50 |
z15n50 |
|
DBDA2 Ch 8syntheticgaussian
parseable
sampleable
Intercept-only Bernoulli model; identity link estimates p directly from 50 trials with 15 successes.
|
| — |
:kruschke |
z6n8z2n7 |
z6n8z2n7 |
|
DBDA2 Ch 8syntheticgaussian
parseable
sampleable
Separate Bernoulli intercept per mint; no intercept centering. Mint 1: 6/8 heads, mint 2: 2/7.
|
| — |
:kruschke |
therapeutic_touch |
therapeutic_touch |
|
Hierarchical Bernoulli model with partial pooling across 28 healers; logit link.
|
| — |
:kruschke |
batting_average |
batting_average |
|
Hierarchical binomial model; players nested within positions; estimates batting average with partial pooling.
|
| — |
:kruschke |
recall |
recall |
|
DBDA2 Ch 12syntheticgaussian
parseable
sampleable
Separate binomial recall probability per condition; no intercept centering. Six conditions with distinct true probabilities.
|
| — |
:kruschke |
recall |
recall |
|
DBDA2 Ch 12syntheticgaussian
parseable
sampleable
Pooled single intercept model for memory recall; baseline / comparison model ignoring condition differences.
|
| — |
:kruschke |
two_group_iq |
two_group_iq |
|
Single-group Gaussian model on IQ scores; prior-predictive / baseline before conditioning on group.
|
| — |
:kruschke |
two_group_iq |
two_group_iq |
|
Two groups with group-specific mean AND sigma; student-t family for robustness against outliers.
|
| — |
:kruschke |
calcium |
calcium |
|
Separate group means for calcium vs. placebo; Gaussian (or student-t for robustness). Outcome is blood-pressure decrease in mm Hg.
|
| — |
:kruschke |
htwt |
htwt |
|
Simple linear regression with z-standardized predictors; student-t family for robustness. Uses n=300 adults.
|
| — |
:kruschke |
hier_linreg |
hier_linreg |
|
Hierarchical model with varying intercepts and slopes per subject; || = uncorrelated random effects; z-standardized predictors.
|
| — |
:kruschke |
income_famsize |
income_famsize |
|
Measurement-error model via | se(); quadratic trend in family size; state-level random slopes. Accounts for known standard error in the outcome.
|
| — |
:kruschke |
guber1999 |
guber1999 |
|
Multiple regression of SAT score on spending and percent taking SAT; percent taking is a suppressor variable.
|
| — |
:kruschke |
guber1999 |
guber1999 |
|
Adds complementary proportion (propnottakez = 1 - prcnttake); explicit centering via 0 + Intercept.
|
| — |
:kruschke |
guber1999 |
guber1999 |
|
Adds interactionz = spendz * prcnttakez (standardized product); student-t for robustness.
|
| — |
:kruschke |
fruitfly |
fruitfly |
|
ANOVA as hierarchical model; partial pooling across companion types for longevity.
|
| — |
:kruschke |
fruitfly |
fruitfly |
|
Pooled / no-group baseline model for longevity; comparison model with no companion-type structure.
|
| — |
:kruschke |
fruitfly |
fruitfly |
|
Robust ANOVA with group-specific means AND sigmas; student-t family for outlier robustness.
|
| — |
:kruschke |
fruitfly |
fruitfly |
|
ANCOVA controlling for thorax length; thorax_c = centered Thorax; common slope across companion groups.
|
| — |
:kruschke |
fruitfly |
fruitfly |
|
ANHECOVA with random slope for thorax length per companion group; allows group-specific relationship between body size and longevity.
|
| — |
:kruschke |
salary |
salary |
|
Two-way random effects ANOVA with interaction; Gaussian family; partial pooling across positions and organizations.
|
| — |
:kruschke |
salary |
salary |
|
Robust variant of salary ANOVA with heterogeneous residual variance per cell (Pos:Org); student-t family.
|
| — |
:kruschke |
splitplot |
splitplot |
|
Split-plot ANOVA with tillage × fertilizer interaction plus blocking on Field.
|
| — |
:kruschke |
splitplot |
splitplot |
|
Split-plot ANOVA without explicit field blocking; comparison model to assess the contribution of the field random effect.
|
| — |
:kruschke |
htwt110 |
htwt110 |
|
Logistic regression predicting sex from standardized weight; single metric predictor.
|
| — |
:kruschke |
htwt110 |
htwt110 |
|
Logistic regression with two metric predictors; collinear but jointly informative for predicting sex.
|
| — |
:kruschke |
htwt110 |
htwt110 |
|
Robust nonlinear logistic model; a = probability of guessing (mixture weight); identity link; estimated via nl = TRUE.
|
| — |
:kruschke |
softmax |
softmax1 |
|
Categorical/softmax regression with separate intercept per category; categorical family.
|
| — |
:kruschke |
softmax |
softmax1 |
|
Intercepts-only softmax model; estimates baseline probability per category with no predictors.
|
| — |
:kruschke |
softmax |
condlog1 |
|
Sequential ordinal regression with category-specific slopes via cs(); sratio family. First conditional logistic dataset.
|
| — |
:kruschke |
softmax |
condlog2 |
|
Sequential ordinal regression with category-specific slopes via cs(); sratio family. Second conditional logistic dataset.
|
| — |
:kruschke |
ordinal_probit |
ordinal_probit |
|
Intercept-only ordinal probit model; thresholds estimated with cumulative family and no predictors.
|
| — |
:kruschke |
ordinal_probit |
ordinal_probit |
|
Ordinal model with discrimination parameter; disc controls category spacing and varies with X; lf() submodel.
|
| — |
:kruschke |
ordinal_probit |
ordinal_probit |
|
Heteroscedastic Gaussian comparison model; sigma varies with X; alternative to ordinal family.
|
| — |
:kruschke |
happiness_assets |
happiness_assets |
|
Cumulative ordinal probit with standardized assets as predictor; Assets_s = (Assets - mean) / sd.
|
| — |
:kruschke |
movies |
movies |
|
Cumulative ordinal regression; Year and Length standardized to Year_s and Length_s.
|
| — |
:kruschke |
haireye |
haireye |
|
Poisson log-linear model with main effects and interaction as random effects; models 4×4 contingency table.
|
| — |
:kruschke |
haireye |
haireye |
|
Binomial version of the 4×4 hair-eye contingency table; trials(264) = total N; same random-effects structure as Poisson variant.
|
| — |
:kruschke |
censored |
censored |
|
DBDA2 Ch 25syntheticgaussian
parseable
sampleable
Gaussian model with missing values; brms uses listwise deletion by default. 50 MCAR missing observations out of 500.
|
| — |
:kruschke |
censored |
censored |
|
DBDA2 Ch 25syntheticgaussian
parseable
sampleable
Left/right censored Gaussian model; cen1 ∈ {"left", "none", "right"}; censored at 85 and 115.
|
| — |
:kruschke |
censored |
censored |
|
DBDA2 Ch 25syntheticgaussian
parseable
sampleable
Interval censored Gaussian model; y3 = upper bound of each interval; values rounded to nearest 5.
|
| — |
:burkner_papers |
epilepsy |
epilepsy |
|
Poisson GLMM; interaction of standardised baseline × treatment; random patient intercept.
|
| — |
:burkner_papers |
epilepsy |
epilepsy |
|
Same Poisson GLMM with upper truncation at 104 (the maximum possible count per visit).
|
| — |
:burkner_papers |
epilepsy |
epilepsy |
|
Simplified main-effects Poisson; omits baseline covariate; comparison model.
|
| — |
:burkner_papers |
inhaler |
inhaler |
|
Sequential ratio ordinal model; cs() = category-specific coefficient for treat; sratio("logit") family estimates P(Y > k | Y ≥ k) at each threshold.
|
| — |
:burkner_papers |
kidney |
kidney |
|
Lognormal survival model; cens() handles right-censored observations; random intercept per patient accounts for within-patient correlation between two kidneys.
|
| — |
:burkner_papers |
hetero_jss |
hetero_jss |
|
Gaussian with group-specific sigma; the sub-formula sigma ~ 0 + x models log(sigma) as a function of x.
|
| — |
:burkner_papers |
hetero_jss |
hetero_jss |
|
Bayesian quantile regression at the 25th percentile using an asymmetric Laplace distribution.
|
| — |
:burkner_papers |
fish_rj |
fish_rj |
|
Poisson model for fishing trip catch counts; no zero-inflation component.
|
| — |
:burkner_papers |
fish_rj |
fish_rj |
|
Zero-inflated Poisson; zi sub-model predicts structural-zero probability from child.
|
| — |
:burkner_papers |
rent99 |
rent99 |
|
Tensor-product spline of area × construction year; random intercept per district.
|
| — |
:burkner_papers |
rent99 |
rent99 |
|
Distributional model: both mean and log(sigma) are smooth functions; ID1 label allows correlation between the two sets of district random effects.
|
| — |
:burkner_papers |
loss_rj |
loss_rj |
|
Weibull loss development curve; ult (ultimate loss) varies by accident year; omega = shape, theta = scale; nl = TRUE enables the nonlinear formula.
|
| — |
:burkner_papers |
multi_member |
multi_member |
|
Equal-weight multiple membership; student outcome depends equally on two schools.
|
| — |
:burkner_papers |
multi_member |
multi_member |
|
Weighted multiple membership; w1 + w2 = 1 for each student; weights the school random effects by the time spent at each school.
|
| — |
:action_models |
rw_jget |
jget_sub |
|
Population-level hierarchical regression of the Rescorla-Wagner learning rate (α) on Peters Delusions Inventory (PDI) total score and session number. (1|ID) captures between-subject variability. α is constrained to [0,1] via logistic transformation; regression prior: Normal(0, 0.5) on PDI coefficient.
Note: learning_rate is a latent parameter estimated by running ActionModels on the trial-level JGET data before this regression is applied.
|
| — |
:action_models |
rw_jget |
jget_sub |
|
Population-level hierarchical regression of the Rescorla-Wagner action noise (β, response standard deviation) on PDI score and session. (1|ID) captures subject-level variability. β is unconstrained (exponential link); prior: Normal(0, 0.3) on intercept.
|
| — |
:action_models |
pvl_igt |
ahn_igt |
|
Population-level hierarchical regression of the PVL-Delta learning rate (α ∈ [0,1]) on clinical group (healthy controls, heroin, amphetamine) in the Iowa Gambling Task. (1|subjID) models within-subject random intercepts across trials. Transformed via logistic link; LogitNormal prior on regression coefficients.
|
| — |
:action_models |
pvl_igt |
ahn_igt |
|
Population-level hierarchical regression of prospect-theoretic reward sensitivity (A ∈ [0,1], power parameter in utility transformation u = |r|^A) on clinical group in the Iowa Gambling Task. LogitNormal prior; logistic link.
|
| — |
:action_models |
pvl_igt |
ahn_igt |
|
Population-level hierarchical regression of loss aversion weight (w ∈ [0,∞], scales negative prospect values as -w·|loss|^A) on clinical group in the Iowa Gambling Task. Exponential link; LogNormal prior on regression coefficients.
|
| — |
:action_models |
pvl_igt |
ahn_igt |
|
Population-level hierarchical regression of the softmax inverse temperature (β ∈ [0,∞]; higher → more deterministic deck choice) on clinical group in the Iowa Gambling Task. Exponential link; LogNormal prior on regression coefficients.
|
| — |
:epidist |
outbreak_delays |
outbreak_aggregated |
|
Naive lognormal regression for delay distribution estimation (e.g. symptom onset to case notification). Does not account for interval censoring or right truncation of secondary events, producing estimates biased toward shorter delays. The sigma sub-model (sigma ~ 1) estimates the lognormal standard deviation on the log scale. Baseline model; compare with :delay_marginal.
|
| — |
:epidist |
outbreak_delays |
outbreak_aggregated |
|
Marginal lognormal model correcting for double interval censoring (primary and secondary event times observed only within daily windows) and right truncation (only cases with secondary event before obs_time are observable). Uses a custom marginal_lognormal brms family implemented via the primarycensored Stan library.
vreal() passes auxiliary real-valued data to the custom likelihood: observation cutoff, primary censoring window, secondary censoring window, and upper delay bound. The likelihood integrates over primary event time within the censoring window.
|
| — |
:epinowcast |
epinowcast_basic |
hosp_triangle |
|
Default epinowcast model for nowcasting right-truncated hospitalization counts. enw_expectation(~0 + (1|day)) models expected final counts via a geometric random walk (daily random intercepts on the log scale). enw_reference(~1, dist='lognormal') fits a static lognormal delay distribution shared across all reference dates. Negative-binomial observation model with overdispersion parameter φ.
|
| — |
:epinowcast |
epinowcast_basic |
hosp_triangle |
|
Extends the basic model with a non-parametric report date effect: enw_report(~(1|day_of_week)) adds random intercepts for day of the week of the report date, capturing systematic under-reporting on weekends. All other components identical to :enw_basic.
|
| — |
:epinowcast |
epinowcast_basic |
hosp_triangle |
|
Replaces the parametric lognormal delay with a fully non-parametric discrete-time hazard model. enw_reference(parametric=~0, non_parametric=~0+delay) estimates a separate baseline hazard for each delay value using a Cox proportional hazards formulation. More flexible than lognormal; useful when the delay distribution is multi-modal or irregular.
|
| — |
:epinowcast |
epinowcast_age |
hosp_triangle_age |
|
Hierarchical nowcast jointly modeling three age strata. enw_expectation(...) includes day-of-week and daily random effects per group (.group notation). enw_reference(~1 + (1|age_group)) allows lognormal delay parameters to vary by age group via partial pooling. enw_report(...) accounts for weekend reporting dips shared across groups.
|
| — |
:epinowcast |
epinowcast_age |
hosp_triangle_age |
|
Extends :enw_age_reference with time-varying delay: rw(week, by=age_group) adds a weekly random walk on delay parameters independently per age group, capturing temporal changes in testing and reporting practices (e.g., shifts in test positivity or lab capacity) that affect different age groups differently.
|
| — |
:epinowcast |
epinowcast_rt |
hosp_triangle |
|
Mechanistic renewal-process expectation model that jointly nowcasts and estimates the instantaneous reproduction number Rₜ. r=~1+rw(week) specifies a weekly random walk on log(Rₜ). generation_time=gt_pmf provides a fixed discretised generation time PMF (Gamma-derived). observation=~1+(1|day_of_week) models day-of-week ascertainment variation. enw_reference(~1, dist='lognormal') fits a static lognormal reporting delay.
|
| — |
:rstanarm |
mtcars |
mtcars |
|
stan_glm with default weakly-informative priors (autoscaled Normal). Demonstrates how rstanarm's prior autoscaling adapts to predictor scale. Gaussian family, identity link.
|
| — |
:rstanarm |
clouds |
clouds |
|
stan_lm with an R² prior on explained variance. Full interaction model of cloud-seeding conditions. Gaussian family, identity link.
|
| — |
:rstanarm |
womensrole |
womensrole |
|
stan_glm binomial model of survey agreement with gender-role statements as a function of education and respondent sex. Grouped binomial with logit link.
|
| — |
:rstanarm |
womensrole |
womensrole |
|
Extends the linear education model with a quadratic term to capture diminishing effects at higher education levels. Binomial / logit.
|
| — |
:rstanarm |
kidiq |
kidiq |
|
Baseline Gaussian model regressing child cognitive score on whether the mother completed high school. Demonstrates default weakly-informative priors.
|
| — |
:rstanarm |
kidiq |
kidiq |
|
Regresses child test score on continuous maternal IQ; single continuous predictor. Gaussian / identity.
|
| — |
:rstanarm |
kidiq |
kidiq |
|
Additive model combining both maternal predictors. Gaussian / identity.
|
| — |
:rstanarm |
kidiq |
kidiq |
|
Full interaction; the slope of maternal IQ on child score is allowed to differ by high-school completion status. Gaussian / identity.
|
| — |
:rstanarm |
clotting |
clotting |
|
stan_glm with Gamma family and inverse link, modelling blood clotting time as a function of log plasma concentration, thromboplastin lot, and their interaction. Classic Dobson (2002) §9.2 example.
|
| — |
:rstanarm |
wells |
wells |
|
stan_glm logistic regression of household well-switching on distance to the nearest safe well (in units of 100 metres). Binomial / logit.
|
| — |
:rstanarm |
wells |
wells |
|
Adds arsenic level of the current well as a second predictor for switching. Binomial / logit.
|
| — |
:rstanarm |
roaches |
roaches |
|
stan_glm Poisson regression for post-treatment roach trap counts, controlling for pre-treatment baseline and senior-housing status. Trap-exposure days enter as a log offset. Poisson / log.
|
| — |
:rstanarm |
roaches |
roaches |
|
Same predictors as :roaches_poisson but with the negative binomial family to accommodate overdispersion and excess zeros. stan_glm.nb / log.
|
| — |
:rstanarm |
weightgain |
weightgain |
|
stan_aov two-way factorial model with R² prior on variance explained by the protein source × protein level interaction. Gaussian / identity.
|
| — |
:rstanarm |
weightgain |
weightgain |
|
stan_lmer refit treating the factorial structure as nested random intercepts, illustrating partial pooling across factor levels. Gaussian / identity.
|
| — |
:rstanarm |
esoph |
esoph |
|
stan_polr proportional-odds model of tobacco consumption group as a function of age and alcohol group. Ordered logistic.
|
| — |
:rstanarm |
gasoline_yield |
gasoline_yield |
|
stan_betareg for proportion outcome (0–1): fraction of crude oil converted to gasoline as a function of API gravity, vapor pressure, vaporization temperature, and batch factor. Beta / logit (mean), constant precision.
|
| — |
:rstanarm |
gasoline_yield |
gasoline_yield |
|
Extends :gasoline_beta by modelling precision (phi) as a function of gravity and pressure. The | separator follows the betareg/rstanarm distributional formula interface. Beta / logit (mean) + log (precision).
|
| — |
:rstanarm |
cbpp_glmm |
cbpp_rs |
|
Canonical stan_glmer example from the rstanarm mixed effects vignette. Herd-level random intercept for disease incidence across 4 time periods. Binomial / logit.
|
| — |
:rstanarm |
bball_pooling |
bball1970 |
|
Complete-pooling estimate: single shared batting-average parameter for all 18 players. Binomial / logit. Compare with :bball_nopooling and :bball_partial.
|
| — |
:rstanarm |
bball_pooling |
bball1970 |
|
No-pooling model: independent intercept per player, no shrinkage. Binomial / logit.
|
| — |
:rstanarm |
bball_pooling |
bball1970 |
|
Hierarchical shrinkage model: player-level random intercepts partially pool estimates toward the population mean. stan_glmer / Binomial / logit. The rstanarm pooling vignette shows this recovers end-of-season averages better than either complete or no pooling.
|
| — |
:vasishth |
pupil |
pupil |
|
Gaussian regression; higher cognitive load → larger pupil dilation.
|
| — |
:vasishth |
spacebar |
spacebar |
|
Lognormal regression; practice effect: RT decreases linearly on log scale.
|
| — |
:vasishth |
recall_wm |
recall_wm |
|
Bernoulli(logit) regression; set-size effect on recall accuracy.
|
| — |
:vasishth |
n400 |
n400 |
|
Varying intercepts and slopes for subjects, uncorrelated; || suppresses the correlation parameter between intercept and slope.
|
| — |
:vasishth |
n400 |
n400 |
|
Varying intercepts and correlated slopes for subjects; | estimates the intercept–slope correlation.
|
| — |
:vasishth |
n400 |
n400 |
|
Crossed random effects for subjects and items; both have varying intercepts and slopes.
|
| — |
:vasishth |
n400 |
n400 |
|
Distributional model: residual sigma modeled with a subject-level random intercept, allowing between-subject variability in residual spread.
|
| — |
:vasishth |
stroop |
stroop |
|
Lognormal regression; varying intercepts and correlated slopes per subject; Stroop congruence effect estimated per subject.
|
| — |
:vasishth |
pooling |
pooling |
|
Hierarchical / partial pooling; adaptive shrinkage across subjects.
|
| — |
:vasishth |
pooling |
pooling |
|
Complete pooling; single intercept ignoring subject identity.
|
| — |
:vasishth |
pooling |
pooling |
|
No pooling; one intercept per subject; cell-means parameterization.
|
| — |
:vasishth |
contrasts1 |
contrasts1 |
|
Factor as predictor; treatment contrast by default (reference level = "A").
|
| — |
:vasishth |
contrasts1 |
contrasts1 |
|
Cell-means parameterization; no global intercept; each level gets its own mean.
|
| — |
:vasishth |
contrasts1 |
contrasts1 |
|
Monotonic effect; F treated as ordered categorical; mo() constrains the effect to be monotonically increasing or decreasing across levels.
|
| — |
:vasishth |
contrasts2x2 |
contrasts2x2 |
|
Full factorial Gaussian model: main effects of A and B plus A×B interaction.
|
| — |
:vasishth |
contrasts2x2 |
contrasts2x2 |
|
A nested in B; A effects estimated separately within each level of B.
|
| — |
:vasishth |
contrasts2x2 |
contrasts2x2 |
|
Bernoulli(logit) regression; 2×2 factorial design with binary outcome pDV.
|
| — |
:vasishth |
meta_sbi |
meta_sbi |
|
resp_se() passes known measurement error; sigma = FALSE fixes residual SD to 0; random study intercept captures between-study heterogeneity τ.
|
| — |
:vasishth |
indiv_diff |
indiv_diff |
|
Naive OLS ignoring measurement error in both predictor and response; biased estimates.
|
| — |
:vasishth |
indiv_diff |
indiv_diff |
|
Measurement error in both response and predictor; me() propagates predictor uncertainty; resp_se() propagates response uncertainty and adds residual sigma.
|
| — |
:bmm |
color_wheel_mixture |
bays2009_synth |
|
Two-parameter mixture model for continuous report working memory data (Bays et al. 2009). The response error is decomposed into:
Both thetat (log-odds of remembering) and kappa (von Mises concentration, log scale) are regressed on set size with by-participant random slopes. The 0 + set_size intercept-free parameterisation gives one coefficient per set-size level (treatment of set_size as factor).
bmm model spec: mixture2p(resp_error = "error")
|
| — |
:bmm |
color_wheel_mixture |
bays2009_synth |
|
Three-parameter mixture model extending mixture2p with a non-target swap component (Bays et al. 2009). The response error is a mixture of:
Von Mises centred on the target (memory; thetat, kappa)
Von Mises centred on a randomly selected non-target (swap; thetant, same kappa)
Uniform (guessing)
thetant captures log-odds of swapping to a non-target. Requires non-target feature angles (non_target_1–non_target_5) and set_size.
bmm model spec: mixture3p(resp_error="error", nt_features=paste0("non_target_",1:5), set_size="set_size")
|
| — |
:bmm |
sdm_condition |
sdm_synth |
|
Signal Discrimination Model (Oberauer 2023) fit to a three-condition continuous report experiment. The SDM represents memory as a signal on a circular space; the response reflects discrimination between a memory trace and noise.
c (memory strength, real-valued) and kappa (precision, log scale) each receive one coefficient per condition via 0 + cond. The model uses a custom circular-normal likelihood implemented via brms stanvar().
bmm model spec: sdm(resp_error = "y")
|
| — |
:bmm |
imm_condition |
imm_synth |
|
Full Interference Measurement Model (Oberauer & Lin 2017) with all four parameters varying across two conditions:
c — baseline memory strength (item activation)
a — associative activation (binding strength)
s — spatial similarity gradient (spread of interference)
kappa — von Mises precision (log scale)
Each parameter gets one coefficient per condition via 0 + cond. Non-target feature angles (color_item2–color_item5) and spatial distances (dist_item2–dist_item5) enter the likelihood directly (not as predictors in the formula).
bmm model spec: imm(resp_error="resp_error", nt_features=paste0("color_item",2:5), set_size="set_size", nt_distances=paste0("dist_item",2:5), version="full")
|
| — |
:flocker |
single_season |
fd_rep_varying |
|
Single-season multi-species occupancy model with site-level (uc1) and visit-level (ec1) covariates.
occ sub-model: log-odds of occupancy at a site; uc1 as fixed slope and random slope by species.
det sub-model: log-odds of detection given presence; both uc1 and the event-varying ec1 with random slopes by species.
Species-level random effects pool information across the 10 species. The model returns a brmsfit object; all brms post-processing tools apply.
flocker call: flock(f_occ = ~ uc1 + (1 + uc1 | species), f_det = ~ uc1 + ec1 + (1 + uc1 + ec1 | species), flocker_data = fd)
|
| — |
:flocker |
single_season |
fd_rep_varying |
|
Single-season multi-species occupancy model with only site-level (uc1) covariates in both occupancy and detection sub-models (no event-varying covariate). Detection probability is constant across visits within a site, enabling an efficient "rep-constant" parameterisation in flocker.
flocker call: flock(f_occ = ~ uc1 + (1 + uc1 | species), f_det = ~ uc1 + (1 + uc1 | species), flocker_data = fd, rep_constant = TRUE)
|
| — |
:flocker |
colex_multiseason |
fd_multi |
|
Dynamic (multi-season) colonisation-extinction occupancy model with explicit estimation of initial occupancy. Four sub-models:
occ — initial occupancy at season 1 (log-odds)
det — detection given presence (log-odds; with event covariate)
col — colonisation probability (log-odds): unoccupied sites becoming occupied
ex — extinction probability (log-odds): occupied sites becoming unoccupied
multi_init = "explicit" in flocker: initial occupancy estimated freely.
flocker call: flock(f_occ=~uc1, f_det=~uc1+ec1, f_col=~uc1, f_ex=~uc1, flocker_data=fd, multiseason="colex", multi_init="explicit")
|
| — |
:flocker |
colex_multiseason |
fd_multi |
|
Dynamic colonisation-extinction occupancy model where initial occupancy is derived from the colonisation/extinction equilibrium rather than estimated as a free parameter. No occ sub-model; initial occupancy = col / (col + ex).
multi_init = "equilibrium" in flocker. Reduces parameters and enforces stationarity of the occupancy process.
flocker call: flock(f_det=~uc1+ec1, f_col=~uc1, f_ex=~uc1, flocker_data=fd, multiseason="colex", multi_init="equilibrium")
|
| — |
:flocker |
autologistic_multiseason |
fd_multi |
|
Autologistic dynamic occupancy model: colonisation and persistence share predictor structure; a constant logit-scale offset (auto: ~ 1) is added to persistence probability relative to colonisation. Initial occupancy at equilibrium.
multiseason = "autologistic", multi_init = "equilibrium" in flocker. The autologistic formulation is more parsimonious than explicit colex when persistence and colonisation share the same predictors.
flocker call: flock(f_det=~uc1+ec1, f_col=~uc1, f_auto=~1, flocker_data=fd, multiseason="autologistic", multi_init="equilibrium")
|
| — |
:flocker |
augmented_richness |
fd_augmented |
|
Data augmentation approach for estimating total species richness from incomplete sampling. The dataset includes 50 observed species plus 50 pseudospecies (all-zero detection histories); the occupancy probability of pseudospecies reflects the probability that an unobserved species is actually present.
ff_species is flocker's reserved grouping keyword for species in augmented models. Occupancy random intercept by species captures species-level variation in commonness; detection random slopes by species capture variation in detectability.
flocker call: flock(f_occ=~(1|ff_species), f_det=~uc1+ec1+(1+uc1+ec1|ff_species), flocker_data=fd, augmented=TRUE)
|
| — |
:mvgam |
portal_counts |
portal_synth |
|
Baseline Poisson GLM capturing inter-annual variation in rodent counts via hierarchical (random-effects) smooths on year. s(year_fac, bs = "re") - 1 is the mgcv notation for a random intercept per year level with no overall intercept. No explicit latent trend process.
Fit with: mvgam(count ~ s(year_fac, bs="re") - 1, family=poisson(), data=portal_train, trend_model="None")
|
| — |
:mvgam |
portal_counts |
portal_synth |
|
State-space Poisson model separating a smooth observation-level NDVI effect from a latent AR(1) trend process. The trend captures residual temporal autocorrelation not explained by the environmental covariate.
obs formula: intercept-only observation model
trend formula: smooth NDVI effect at the latent process level (k = 6 basis functions)
trend_model = AR(): AR(1) latent trend
Fit with: mvgam(count ~ 1, trend_formula = ~ s(ndvi_ma12, k=6), trend_model=AR(), family=poisson(), data=portal_train)
|
| — |
:mvgam |
portal_counts |
portal_synth |
|
Multi-series Poisson model where all five species share a single latent AR(1) trend, with series-specific observation offsets and a cyclic seasonal spline at the trend level.
obs formula: series - 1 gives a species-specific intercept (fixed offset)
trend formula: cyclic cubic regression spline for seasonality (bs = "cc")
trend_model = AR() with trend_map forcing all series to share one trend
The shared-trend structure is specified via a trend_map data.frame passed separately to mvgam() mapping each series to the same latent trend index.
Fit with: mvgam(count~series-1, trend_formula=~s(season,bs="cc",k=8), trend_model=AR(), family=poisson(), data=portal_train, trend_map=trend_map)
|
| — |
:mvgam |
plankton_var |
plankton_synth |
|
Vector Autoregressive (VAR) model for multivariate Gaussian plankton time series with correlated process errors. Environmental forcing (temperature × month tensor product) acts at the latent process level.
obs formula: no observation-level predictors
trend formula: shared tensor-product smooth te(temp, month, k=c(4,4)) plus species-specific deviations (by = trend); -1 removes intercept
trend_model = VAR(cor = TRUE): VAR with correlated cross-series innovations
The by = trend idiom in mvgam indexes each latent trend series, allowing species-specific environmental response curves.
Fit with: mvgam(y~-1, trend_formula=~te(temp,month,k=c(4,4))+te(temp,month,k=c(4,4),by=trend)-1, trend_model=VAR(cor=TRUE), family=gaussian(), data=plankton_train)
|
| — |
:mvgam |
salmon_survival |
salmon_synth |
|
Beta-distributed salmon survival proportions with an AR(1) latent trend and a time-varying effect of spring upwelling index (CUI.apr).
obs formula: intercept-only observation model (Beta family)
trend formula: dynamic(CUI.apr, k=25, scale=FALSE) makes the regression coefficient on upwelling a smooth function of time (random-walk basis with 25 knots)
trend_model = AR(): AR(1) latent process in addition to the TVP
The dynamic() function in mvgam fits a time-varying parameter (TVP) model where the coefficient evolves as a random walk or Hilbert-space GP over time.
Fit with: mvgam(survival~1, trend_formula=~dynamic(CUI.apr,k=25,scale=FALSE)-1, trend_model=AR(), family=betar(), data=salmon_train)
|
| — |
:mvgam |
nmix_detection |
nmix_synth |
|
N-mixture model for imperfect detection with non-parametric smooth effects. The N-mixture likelihood jointly models the imperfect-detection observation process and the true abundance process.
obs formula: detection probability sub-model; smooth effects of two detection covariates
trend formula: latent abundance sub-model; smooth abundance covariate + hierarchical random effect for the categorical habitat factor
family = nmix(): N-mixture likelihood (Royle 2004)
Fit with: mvgam(y~s(det_cov,k=4)+s(det_cov2,k=4), trend_formula=~s(abund_cov,k=4)+s(abund_fac,bs="re"), family=nmix(), data=nmix_data)
|
| — |
:lme4 |
sleep_deprivation |
sleepstudy |
|
LMM with correlated by-subject random slope and intercept for Days. (Days | Subject) fits one 2×2 random-effects covariance matrix per subject.
lmer(Reaction ~ Days + (Days | Subject), data = sleepstudy)
|
| — |
:lme4 |
sleep_deprivation |
sleepstudy |
|
LMM with uncorrelated by-subject random slope and intercept. (Days || Subject) constrains the off-diagonal covariance to zero (diagonal random-effects covariance matrix).
lmer(Reaction ~ Days + (Days || Subject), data = sleepstudy)
|
| — |
:lme4 |
dyestuff |
dyestuff |
|
The simplest possible LMM: grand-mean intercept plus a random intercept for each batch. Introductory example in Bates et al. (JSS 2015, §2).
lmer(Yield ~ 1 + (1 | Batch), data = Dyestuff)
|
| — |
:lme4 |
cbpp |
lme4_cbpp |
|
Binomial GLMM for CBPP incidence using lme4's matrix-response cbind syntax. Contrast with the brms equivalent: incidence | trials(size) ~ period + (1|herd).
glmer(cbind(incidence, size - incidence) ~ period + (1 | herd),
family = binomial, data = cbpp)
|
| — |
:lme4 |
penicillin |
penicillin |
|
LMM with two fully crossed random intercepts (plates and samples). Neither grouping factor is nested within the other.
lmer(diameter ~ 1 + (1 | plate) + (1 | sample), data = Penicillin)
|
| — |
:lme4 |
pastes |
pastes |
|
LMM with nested random effects. batch/cask expands to (1|batch) + (1|batch:cask); casks are identified locally within each batch, not globally.
lmer(strength ~ (1 | batch/cask), data = Pastes)
|
| — |
:lme4 |
verbal_aggression |
verbagg |
|
Bernoulli GLMM with two fully crossed random intercepts (subjects × items). r2 is recoded to integer 0/1 from Y/N.
glmer(r2 ~ Anger + Gender + btype + situ + (1|id) + (1|item),
family = binomial, data = VerbAgg)
|
| — |
:lme4 |
contraception |
contraception |
|
Binomial GLMM for contraception use with a random slope for urban within district — allowing the urban/rural gap to vary across districts. use is recoded from Y/N to integer 0/1.
glmer(use ~ age + I(age^2) + livch + urban + (urban | district),
family = binomial, data = Contraception)
|
| — |
:mixed_models_jl |
dyestuff |
dyestuff |
|
The canonical introductory LMM in MixedModels.jl: one variance component for batch-to-batch variability, no fixed covariates.
fit(LinearMixedModel, @formula(Yield ~ 1 + (1 | Batch)), dyestuff)
Note: MixedModels.jl's bundled copy uses lowercase yield/batch; the Rdatasets CSV uses Yield/Batch.
|
| — |
:mixed_models_jl |
sleep_deprivation |
sleepstudy |
|
LMM with correlated by-subject random slope and intercept for Days. Idiomatic MixedModels.jl style writes explicit 1 + intercepts.
fit(LinearMixedModel, @formula(Reaction ~ 1 + Days + (1 + Days | Subject)), sleepstudy)
|
| — |
:mixed_models_jl |
sleep_deprivation |
sleepstudy |
|
Same as the correlated model but with the off-diagonal covariance forced to zero. MixedModels.jl uses zerocorr() instead of lme4's (x || g) syntax.
fit(LinearMixedModel,
@formula(Reaction ~ 1 + Days + zerocorr(1 + Days | Subject)), sleepstudy)
|
| — |
:mixed_models_jl |
penicillin |
penicillin |
|
LMM with two fully crossed random intercepts. Neither plate nor sample is nested within the other; both random intercepts appear additively.
fit(LinearMixedModel,
@formula(diameter ~ 1 + (1 | plate) + (1 | sample)), penicillin)
|
| — |
:mixed_models_jl |
pastes |
pastes |
|
LMM with nested random effects: batch/cask expands to (1|batch) + (1|batch:cask). Cask labels are local to each batch.
fit(LinearMixedModel, @formula(strength ~ 1 + (1 | batch/cask)), pastes)
|
| — |
:mixed_models_jl |
verbal_aggression |
verbagg |
|
Bernoulli GLMM with two crossed random intercepts (subjects × items). r2 recoded from Y/N to integer 0/1.
fit(GeneralizedLinearMixedModel,
@formula(r2 ~ 1 + Anger + Gender + btype + situ + (1|id) + (1|item)),
verbagg, Bernoulli())
|
| — |
:mixed_models_jl |
contraception |
contraception |
|
Bernoulli GLMM for contraception use in Bangladesh. MixedModels.jl uses abs2() (squaring function) inside @formula instead of R's I(age^2). use recoded from Y/N to integer 0/1.
fit(GeneralizedLinearMixedModel,
@formula(use ~ 1 + age + abs2(age) + livch + urban + (1|district)),
contraception, Bernoulli())
|
| — |
:inla |
cement |
cement |
|
inla() with family = "gaussian" — the simplest INLA use case, equivalent to lm() but with Bayesian inference via INLA. Demonstrates default weakly-informative priors on regression coefficients.
|
| — |
:inla |
penicillin |
penicillin |
|
f(plate_id, model = "iid") specifies exchangeable random intercepts per assay plate — the INLA equivalent of (1|plate) in lme4. Gaussian family.
|
| — |
:inla |
sleepstudy |
sleepstudy_inla |
|
Random intercept per subject; subject_id is the numeric version of Subject. Gaussian family. Equivalent to lmer(Reaction ~ Days + (1|Subject)).
|
| — |
:inla |
sleepstudy |
sleepstudy_inla |
|
Random slopes model: f(subject_id, Days, ...) specifies subject-specific slopes for Days — the INLA way of writing (0 + Days | Subject). Gaussian family.
|
| — |
:inla |
airpassengers_temporal |
airpassengers |
|
First-order random walk latent field on the time index t; the intercept is absorbed into the random walk (hence 0 +). Gaussian family. Equivalent to a Bayesian smoothing spline.
|
| — |
:inla |
airpassengers_temporal |
airpassengers |
|
Second-order random walk; smoother than RW1, penalises second differences. Equivalent to cubic spline smoothing. Gaussian family.
|
| — |
:inla |
airpassengers_temporal |
airpassengers |
|
Latent AR(1) process over time. Estimates autocorrelation parameter ρ jointly with the observation variance. Gaussian family.
|
| — |
:inla |
airpassengers_temporal |
airpassengers |
|
Seasonal latent field with period 12 months (sum-to-zero constraint within each year). Captures multiplicative seasonality on the log scale. Gaussian family.
|
| — |
:inla |
veteran_survival |
veteran |
|
inla.surv() wraps right-censored event times for INLA's survival families. Weibull proportional hazards model (family = "weibullsurv"); the shape parameter is estimated as a hyperparameter.
|
| — |
:inla |
lidar_smooth |
lidar |
|
1D nonparametric regression using a second-order random walk latent field over the continuous predictor range. constr = FALSE drops the sum-to-zero constraint; -1 removes the fixed intercept (absorbed by the random walk). Gaussian family. Compare with spline-based approaches.
|
| — |
:inla |
surg_mortality |
surg |
|
12-hospital mortality benchmark. f(hospital, model = "iid") with family = "binomial" (trials = n) shrinks small-hospital rates toward the population mean. Demonstrates PC priors on the precision hyperparameter.
|
| — |
:inla |
boston_spatial |
boston_housing |
|
Intrinsic CAR (Besag) spatial random effect for 506 Boston census tracts. f(id, model = "besag", graph = W) requires an adjacency matrix W (spdep object) passed separately — it is not contained in the tabular data. Gaussian family. Also fitted with "bym" (BYM = ICAR + IID) for comparison.
|
| — |
:mcmcglmm |
plodiaPO_iid |
plodiaPO |
|
Intercept-only fixed effects; ~FSfamily random intercept partitions phenoloxidase variance into between-family and within-family components. Gaussian family. Textbook introductory example from the MCMCglmm reference manual.
|
| — |
:mcmcglmm |
btdata_iid |
btdata |
|
Simple random intercept for rearing nest; estimates shared nest environment contribution to tarsus length. Gaussian family.
|
| — |
:mcmcglmm |
btdata_animal |
btdata |
|
The canonical MCMCglmm animal model: animal random effect with the inverse numerator relationship matrix Ainv (from BTped via inverseA()) separates additive genetic variance from shared rearing-environment variance. ginverse = list(animal = Ainv) must be passed at fitting time. Gaussian family.
|
| — |
:mcmcglmm |
chickweight_rslope |
chickweight |
|
Individual chicks vary in both baseline weight and growth rate. ~us(1 + Time):Chick fits a 2×2 unstructured G-matrix per chick capturing the (co)variance of intercepts and slopes. Gaussian family.
|
| — |
:mcmcglmm |
btdata_bivariate |
btdata |
|
Joint model for tarsus length and back colour. trait - 1 gives one intercept per response; us(trait):animal estimates a 2×2 genetic covariance matrix across traits. Allows estimating genetic correlations between morphological traits. ginverse = list(animal = Ainv) required. Gaussian/Gaussian family.
|
| — |
:mcmcglmm |
pbcseq_bivariate |
pbcseq |
|
Joint longitudinal model for continuous log-bilirubin (Gaussian) and binary ascites (threshold/probit). family = c("gaussian", "threshold"). The residual covariance ~us(trait):units accounts for within-visit correlation between the two outcomes after conditioning on the shared subject random effect.
|
| — |
:mcmcglmm |
sshorns_ordinal |
sshorns |
|
Ordered threshold (probit) model for horn morphology: polled < scurred < normal. family = "threshold"; residual variance is fixed at 1 for identifiability. ~id captures repeated-individual variation (some animals appear multiple times).
|
| — |
:glmmtmb |
owls_zi |
owls |
|
glmmTMB with family = poisson and ziformula = ~1 (constant zero-inflation probability). Nest random intercept handles clustering; offset accounts for brood size. Baseline model for owl sibling negotiation calls.
|
| — |
:glmmtmb |
owls_zi |
owls |
|
Same formula as :owls_zip but with family = nbinom2 (variance = μ + μ²/k). Handles both overdispersion and excess zeros. AIC typically preferred over the Poisson version.
|
| — |
:glmmtmb |
owls_zi |
owls |
|
family = nbinom1 (variance = φμ, linear mean-variance relationship); brood size as a fixed covariate rather than offset. Contrasts NB1 vs NB2 parameterisation.
|
| — |
:glmmtmb |
owls_zi |
owls |
|
Hurdle model: ziformula = ~. mirrors the conditional formula in the zero part, combined with family = truncated_nbinom1 for the positive count part. Treats zero-generation and positive-count processes as completely separate.
|
| — |
:glmmtmb |
salamanders_zi |
salamanders |
|
Zero-inflation probability varies by species (ziformula = ~spp). The conditional mean count also varies by species with a site random intercept. family = nbinom2.
|
| — |
:glmmtmb |
salamanders_zi |
salamanders |
|
family = genpois (Generalised Poisson) handles both over- and under-dispersion; zero-inflation depends on both species and mining status.
|
| — |
:glmmtmb |
beta_disp |
beta_sim |
|
family = beta_family() with dispformula = ~x models both the mean proportion and the precision (φ) as functions of x. Demonstrates that ignoring heterogeneous dispersion (using dispformula = ~1) leads to worse fit.
|
| — |
:glmmtmb |
ar1_covar |
ar1_sim |
|
ar1(times + 0 | group) specifies AR(1) autocorrelation across ordered times within each group as a random-effect covariance structure. Gaussian family. Distinguishes glmmTMB from lme4, which does not support non-diagonal random-effect covariance natively.
|
| — |
:glmmtmb |
volcano_spatial |
volcano_spatial |
|
exp(pos + 0 | group) fits a spatial random field with exponential correlation decay. pos must be a numFactor encoding 2D coordinates (x, y). Gaussian family. All observations share one group so the full spatial covariance is estimated as a single 100×100 block. Note: pos = numFactor(x, y) must be computed before calling glmmTMB.
|
| — |
:glm_jl |
dobson_poisson |
dobson_poisson |
|
Canonical example from the GLM.jl documentation (and Dobson 1990). Poisson log-linear model for counts in a two-way layout.
glm(@formula(Counts ~ Outcome + Treatment), dobson, Poisson())
|
| — |
:glm_jl |
quine |
quine |
|
Negative binomial GLM for overdispersed count data (school absent days). Example from the GLM.jl documentation; R equivalent is MASS::glm.nb().
negbin(@formula(Days ~ Eth + Sex + Age + Lrn), quine, LogLink())
|
| — |
:glm_jl |
quine |
quine |
|
Poisson GLM for school absenteeism counts. Overdispersion relative to Poisson motivates the negative-binomial model (:quine_nb). Same formula, different distributional assumption.
glm(@formula(Days ~ Eth + Sex + Age + Lrn), quine, Poisson())
|
| — |
:glm_jl |
trees |
trees |
|
Linear regression of timber volume on tree girth and height; standard OLS via GLM.jl's lm() (equivalent to glm(..., Normal(), IdentityLink())).
lm(@formula(Volume ~ Height + Girth), trees)
|
| — |
:glm_jl |
pima_diabetes |
pima_tr |
|
Binary logistic regression for diabetes diagnosis in Pima Indian women. type is recoded from Yes/No to integer 0/1.
glm(@formula(type ~ npreg + glu + bp + bmi + ped + age), pima, Binomial())
|
| — |
:glm_jl |
lifecycle_savings |
lifecycle_savings |
|
OLS regression of national savings rate on demographic and income predictors (50 countries). Classic textbook dataset (Belsley et al. 1980).
lm(@formula(SR ~ Pop15 + Pop75 + DPI + DDPI), LifeCycleSavings)
|