links = {"LogitLink", "ProbitLink", "LogLogLink", "LogComplementLink",
"ComplementaryLogLogLink", "OddsPowerLink"};
models = Map[
GeneralizedLinearModelFit[data, {x, x^2}, x,
ExponentialFamily -> "Binomial", LinkFunction -> #] &, links];
Column[{Show[ListPlot[data, PlotRange -> All],
Plot[Evaluate[Map[Normal, models]], {x, 1, 20}]],
Style[Grid[
Join[{{"Link Function", "Residual Deviance"}},
SortBy[Transpose[{links,
Table[fun["ResidualDeviance"], {fun, models}]}], Last]],
Dividers -> All], "DialogStyle"]}, Alignment -> Center]