Fitting models
Explaining one column with several others, whatever kind of column it is.
What we have
- Explains a number using other columns, by fitting a straight line.
- Explains a yes/no outcome.
- Explains a yes/no outcome, with a slightly different curve.
- Explains a count — how many times something happened.
- Explains a count that is more spread out than Poisson allows.
- Explains an outcome with ordered categories — poor, fair, good, excellent.
- The same ordered-category model, with the bell-curve shape.
- Explains a choice among categories with no order.
- Draws the coefficients of the model you just fitted, with their error bars.
Coming later
- NB1
exposure()andoffset()irr, to print incidence rate ratiosor, to print odds ratios instead of coefficientspredictandmarginsafterwardspredict,test,lincomandmarginsafterwardsrrr, to print relative risk ratiosvce(cluster ...), which is refused rather than quietly ignored- a
marginsplot, sincemarginsitself is not built - a test of the proportional-odds assumption
- frequency weights (
fw), which are refused - plotting two models side by side
regressExplains a number using other columns, by fitting a straight line.
logitExplains a yes/no outcome.
probitExplains a yes/no outcome, with a slightly different curve.
poissonExplains a count — how many times something happened.
nbregExplains a count that is more spread out than Poisson allows.
ologitExplains an outcome with ordered categories — poor, fair, good, excellent.
oprobitThe same ordered-category model, with the bell-curve shape.
mlogitExplains a choice among categories with no order.
coefplotDraws the coefficients of the model you just fitted, with their error bars.