{smcl}
{hline}
help for {cmd:xlink}{right:(Roger Newson)}
{hline}
{title:Extra link functions for use with {helpb glm}}
{p 8 21 2}
{cmd:glm} [ {varlist} ] {ifin} {weight} [, {opt l:ink(link_function_name)} {help glm:{it:glm_options}} ]
{pstd}
where {it:link_function_name} is the name of a link function
and {help glm:{it:glm_options}} is a list of options other than {cmd:link()} used by {helpb glm}.
{title:Description}
{pstd}
{cmd:xlink} is a library of extra link functions for use with {helpb glm}.
A user-defined link function for {helpb glm} is implemented as an ado file,
with the same name as the link function,
taking 4 arguments containing, respectively, a to-do indicator,
the name of the variable containing the link functions of the predicted means,
the name of the variable containing the predicted means,
and the name of the variable containing the first or second derivatives
of the means with respect to the link functions.
The to-do indicator is an integer argument, with values from -1 to 3,
indicating whether the ado-file is being asked to set global macros,
link functions, predicted means, first derivatives of predicted means,
and second derivatives of predicted means,
respectively.
{title:Link functions}
{pstd}
These are defined using twice-differential monotonic transformations,
defining the predicted mean {cmd:mu} as a function of the predicted link function {cmd:eta}
or {it:vice versa}. The link function is the quantity equal to the {cmd:xb} variable generated by {helpb predict}
after {helpb glm}.
{phang}
{opt robit1}, {opt robit2}, {opt robit3}, {opt robit4},
{opt robit5}, {opt robit6}, {opt robit7}, {opt robit8}, {opt robit9}, and {opt robit10}
indicates the robit link with 1, 2, 3, 4, 5, 6, 7, 8, 9, and 10 degrees of freedom,
respectively.
These link functions are defined by the formulas
{pstd}
{cmd:mu = t(eta,{it:k})}
{pstd}
and
{pstd}
{cmd:eta=invt(mu,{it:k})}
{pstd}
where {it:k} is the number of degrees of freedom.
{pstd}
The {cmd:robit4} link function was recommended by
{help xlink##xlink_kang2007:Kang and Shaffer (2007)}.
The {cmd:robit7} link function was recommended by
{help xlink##xlink_liu2004:Liu (2004)}
as being similar to the logit link function,
but less influenced by outlying outcome values.
The {cmd:robit9} link function was mentioned by
{help xlink##xlink_mudholkar1978:Mudholkar and George (1978)}
as having a similar kurtosis to the logit link function.
In general, robit link functions with fewer degrees of freedom
are influenced less by outliers than robit link functions with more degrees of freedom.
In the limit, as {it:k} tends to infinity,
the robit link function with {it:k} degrees of freedom
tends to the probit link function.
{pstd}
Users are hereby encouraged by the author to suggest additional link functions
to be added to {cmd:xlink}.
{title:Examples}
{phang2}{cmd:. sysuse auto, clear}{p_end}
{phang2}{cmd:. glm foreign weight mpg, family(bernoulli) link(robit7) vce(robust) eform}{p_end}
{marker xlink_references}{...}
{title:References}
{phang}
{marker xlink_kang2007}{...}
Kang, J. D. Y. and Schafer, J. L. 2007.
Demystifying double robustness:
A comparison of alternative strategies forestimating a population mean from incomplete data.
{it:Statistical Science} {bf:22}: 523-539.
{phang}
{marker xlink_liu2004}{...}
Liu, C. H.
2004.
Robit Regression: A Simple Robust Alternative to Logistic and Probit Regression.
Chapter 21 of:
Gelman, A. and Meng, X-L.
2004.
{it:Applied Bayesian Modeling and Causal Inference from Incomplete-Data Perspectives:}
{it:An Essential Journey with Donald Rubin's Statistical Family.}
Chichester, UK: John Wiley & Sons Ltd.
Download from {browse "https://onlinelibrary.wiley.com/doi/10.1002/0470090456.ch21":the Wiley Online website}.
{phang}
{marker xlink_mudholkar1978}{...}
Mudholkar, G. S. and George, E. O.
1978.
A remark on the shape of the logistic distribution.
{it:Biometrika} {bf:65}: 667-668.
{title:Author}
{pstd}
Roger Newson, King's College London, UK.{break}
Email: {browse "mailto:roger.newson@kcl.ac.uk":roger.newson@kcl.ac.uk}
{title:Also see}
{p 4 13 2}
{bind: }Manual: {hi:[R] glm}
{p_end}
{p 4 13 2}
On-line: help for {helpb glm}
{p_end}