## Stata Software

#### Hosmer-Lemeshow test

This package performs the Hosmer-Lemeshow test to assess the fit of, typically, a logistic regression model. The program allows you to change the groupings used and plot the observed and predicted values within each group. In addition the program can be used to assess out of sample predictions.

Obtain the Hosmer-Lemeshow test package (zipped) here or type the following within Stata.

*net from http://www.ucl.ac.uk/statistics/research/biostatistics*

#### Penalised logistic regression

The package fits logistic regression models with a likelihood penalised by lambda*B'PB where B is the beta vector of length c and P a c*c penalisation matrix. By default P is a diagonal matrix with elements Var(xj) so that the likelihood is penalised by lambda times the sum of standardised beta's squared.

An alternative penalisation term is lambda*sum_j(|bj|) which is the lasso of Tibshirani. This has the effect of shrinking some coefficients exactly to zero, providing a form of variable selection.

Obtain the penalised logistic regression package (zipped) here or type the following within Stata.

*net from http://www.ucl.ac.uk/statistics/research/biostatistics*

#### Stepdown

The stepdown routine is used after an estimation command to approximate the linear predictor to a given level of accuracy (assessed using R2).

Obtain the stepdown package (zipped) here or type the following within Stata.

*net from http://www.ucl.ac.uk/statistics/research/biostatistics*

Click here to view the accompanying insert (postscript).

#### Generalized Additive Models

An update of the original STB program (STB-43 sg79) can be found on Patrick Royston's webpage.