Peter Ralph
3 December 2020 – Advanced Biological Statistics
Care, or at least think, about the data.
Look at the data.
Query the data.
Check the results.
Communicate.
How well a statistical method works depends on the situation.
We can describe the “situation” with a probability model.
Inference usually works best if the probabilistic model reflects reality .
Explicit models make it easy to simulate, and therefore test your methods.
Stan lets you do inference using (almost) arbitrary models.
It is often possible to infer things about populations that we can’t infer about individuals.
Doing so leads to sharing of information (or, “power”) between samples, and can improve accuracy.
Priors (and hyperpriors) on individual parameters provides a good way to do this.
Distributions:
Visualization:
Statistical models:
How number of pumpkins per vine depends on fertilizer and water amount.
How distance from home to workplace is predicted by income, job category, and city.
How (presence or absence of) hip dysplasia in dogs depends on age and breed.
How doughnut weight varies between and within bakeries and doughnut types.
How house prices are predicted by elevation, distance to stores, and square footage.
Options: normal / binomial / poisson / gamma / cauchy
The brms
package lets you
fit hierarchical models using Stan
with mixed-model syntax!!!
# e.g.
brm(formula = z ~ x + y + (1 + y|f), data = xy,
family = poisson(link='log'))
# or
brm(formula = z ~ x + y + (1 + y|f), data = xy,
family = student(link='identity'))