\Header{make.link}{Create a Link for GLM families}
\keyword{models}{make.link}
\begin{Usage}
\begin{verbatim}
make.link(link)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\texttt{link}] character or numeric; one of \texttt{"logit"},
\texttt{"probit"}, \texttt{"cloglog"}, \texttt{"identity"},
\texttt{"log"},  \texttt{"sqrt"},  \texttt{"1/mu$\,\hat{\,}$2"},
\texttt{"inverse"}, or number, say \eqn{\lambda}{lambda} resulting
in power link \eqn{=\mu ^ \lambda}{mu ^ lambda}.
\end{ldescription}
\end{Arguments}
\begin{Description}
This function is used with the \texttt{\Link{family}} functions in
\texttt{\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{Value}
A list with components
\begin{ldescription}
\item[\texttt{linkfun}] Link function \texttt{function(mu)}
\item[\texttt{linkinv}] Inverse link function \texttt{function(eta)}
\item[\texttt{mu.eta}] Derivative \texttt{function(eta)} \eqn{d\mu / d\eta}{dmu/deta}
\item[\texttt{valideta}] \texttt{function(eta)}\{ \texttt{TRUE} if all of
\texttt{eta} is in the domain of \texttt{linkinv} \}.
\end{ldescription}
\end{Value}
\begin{SeeAlso}
\texttt{\Link{glm}}, \texttt{\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}

