Home  >>  Archives  >>  Volume 2 Number 4  >>  st0027

The Stata Journal
Volume 2 Number 4: pp. 378-390



Subscribe to the Stata Journal
cover

Programmable GLM: Two user–defined links

Weihua Guan
Stata Corporation
Roberto G. Gutierrez
Stata Corporation
Abstract.   With the release of Stata 7, the glm command for fitting generalized linear models underwent a substantial overhaul. Stata 7 glm contains an expanded array of variance estimators, regression diagnostics, and other enhancements. The overhaul took place to coincide with the release of Hardin and Hilbe (2001). With the new glm came a modular design that enables users to program customized link functions, variance functions, and weight functions to be used if Newey–West covariance estimates are desired. Because cases requiring customized link functions are the more prevalent in the literature, only those are considered here. We give two examples where a nonstandard link function is required: the relative survival model of Hakulinen and Tenkanen (1987) and a logistic model that accounts for natural response as described in Collett (2003). The relative ease (over previous versions of Stata) with which these alternate links can be programmed into glm is demonstrated.
Terms of use     View this article (PDF)

View all articles by these authors: Weihua Guan, Roberto G. Gutierrez

View all articles with these keywords: GLM, survival analysis, Cox regression, programming

Download citation: BibTeX  RIS

Download citation and abstract: BibTeX  RIS