.- help for ^rglm^ .- Generalized linear models with robust variance estimates --------------------------------------------------------- ^rglm^ [varlist] [weight] [^if^ exp] [^in^ range] [^,^ ^cl^uster^(^varname^)^ ^ms^pec ^td^ist minus(#) glm-options ] Description ------------ ^rglm^ fits generalized linear models and calculates a Huber (sandwich) estimate of the variance-covariance matrix of estimates. It can be used alone or called without arguments after a previous call to ^glm^. As with other "robust" commands, the units may be considered to fall into clusters. Options for use with ^rglm^ -------------------------- ^cluster(^varname^)^ specifies the variable which defines sampling clusters. ^mspec^ specifies that full Huber variances be used. These are robust to mis-specification of conditional means. If ^mspec^ is absent, semi-Huber variances are calculated, robust to variance mis-specification caused by overdispersion, underdispersion, heteroscedasticity and clustering, but assuming that conditional means are specified correctly by the model. (Except in the case of canonical link functions, where the semi-Huber variance is the full Huber variance. See Section 2.5 of McCullagh and Nelder (1989).) ^tdist^ specifies that P-values and confidence intervals are to be calculated assuming estimates to have a t-distribution with M-k degrees of freedom, where k is the number of model parameters, and M is the number of clusters if ^cluster^ is specified, or the number of observations if ^cluster^ is not specified. ^minus(^#^)^ specifies the ^minus^ parameter to pass to ^_robust^, to apply a finite-sample adjustment to the Huber covariance matrix. If absent (or negative), it is reset to k (the number of model parameters). If a varlist is supplied, then all ^glm^ options are allowed. If not, then the only ^glm^ options allowed are ^level^ and ^eform^, and ^cluster^, ^mspec^, ^tdist^ and ^minus^ are ignored. Examples --------- . ^glm dead ln_dose, family(binomial ntest) link(logit)^ . ^rglm, ms^ . ^rglm dead ln_dose, family(binomial ntest) link(logit)^ . ^rglm dead ln_dose, family(binomial ntest) link(logit) clust(group)^ Author ------- Roger Newson, Imperial College School of Medicine, London, UK. Email: ^r.newson@@ic.ac.uk^ Acknowledgment --------------- This program was based on a previous version called hglm, which calculated semi-Huber variances, and was kindly supplied to the author by David Clayton of MRC in Cambridge, England. Also see --------- Manual: ^[R] glm, [R] _robust^ References ----------- McCullagh, P. and J. A. Nelder. 1989. Generalized Linear Models. 2d ed. London: Chapman & Hall.