\Header{make.link}{Create a Link for GLM families}
\keyword{models}{make.link}
\begin{Description}\relax
This function is used with the \code{\Link{family}} functions in
\code{\Link{glm}()}.
Given a link, it returns a link function, an inverse link
function, the derivative \eqn{d\mu / d\eta}{dmu/deta} and a function
for domain checking.
\end{Description}
\begin{Usage}
\begin{verbatim}
make.link(link)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{link}] character or numeric; one of \code{"logit"},
\code{"probit"}, \code{"cloglog"}, \code{"identity"},
\code{"log"},  \code{"sqrt"},  \code{"1/mu\textasciicircum{}2"},
\code{"inverse"}, or number, say \eqn{\lambda}{lambda} resulting
in power link \eqn{=\mu ^ \lambda}{mu ^ lambda}.
\end{ldescription}
\end{Arguments}
\begin{Value}
A list with components
\begin{ldescription}
\item[\code{linkfun}] Link function \code{function(mu)}
\item[\code{linkinv}] Inverse link function \code{function(eta)}
\item[\code{mu.eta}] Derivative \code{function(eta)} \eqn{d\mu / d\eta}{dmu/deta}
\item[\code{valideta}] \code{function(eta)}\{ \code{TRUE} if all of
\code{eta} is in the domain of \code{linkinv} \}.
\end{ldescription}
\end{Value}
\begin{SeeAlso}\relax
\code{\Link{glm}}, \code{\Link{family}}.
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
str(make.link("logit"))

l2 <- make.link(2)
l2$linkfun(0:3)# 0 1 4 9
l2$mu.eta(eta= 1:2)#= 1/(2*sqrt(eta))
\end{ExampleCode}
\end{Examples}

