Configuring R
Functions from these packages will be used throughout this document:
Here are some R settings I use in this document:
We use different probability models for different data types
We use different link functions to connect these models with covariates
- Bernoulli models: logit link
- Count models: log link + offset
- Survival models: log link
- Gaussian models: identity link
Figure 1 shows how the various models we have studied have analogous structures: each row uses model-specific transformations to connect the modeled quantity to a linear predictor \(\eta(\mathord{\smash[b]{\underset{\raise.3ex\hbox{$\scriptstyle\sim$}}{x}}\vphantom{x}}) = \mathord{\smash[b]{\underset{\raise.3ex\hbox{$\scriptstyle\sim$}}{x}}\vphantom{x}} \cdot \mathord{\smash[b]{\underset{\raise.3ex\hbox{$\scriptstyle\sim$}}{\beta}}\vphantom{\beta}} + \eta_0\).
We use maximum likelihood estimation to fit models to data
We use asymptotic normality of MLEs to quantify uncertainty about models
We use (log) likelihood ratios to compare models
Sometimes we adjust these comparisons for model size (AIC, BIC)
Back to top