linkfunvlm.RdReturns the link functions, and parameter names, for vector generalized linear models (VGLMs).
linkfun(object, ...)
linkfunvlm(object, earg = FALSE, by.var = FALSE, ...)An object which has parameter link functions, e.g.,
has class "vglm".
Logical.
Return the extra arguments associated with each
link function? If TRUE then a list is returned.
Logical.
If TRUE then a named character vector is returned,
corresponding to coef(object),
with the link function corresponding to each
regression coefficient.
Arguments that might be used in the future.
All fitted VGLMs have a link function applied to each parameter. This function returns these, and optionally, the extra arguments associated with them.
By default,
usually just a (named) character string, with the link functions
in order.
It is named with the parameter names.
If earg = TRUE then a list with the following components.
The default output.
The extra arguments, in order.
If by.var = TRUE then what is returned is described
above.
Presently, the multinomial logit model has only
one link function, multilogitlink,
so a warning is not issued for that link.
For other models, if the number of link functions does
not equal \(M\) then a warning may be issued.
linkfun,
multilogitlink,
vglm,
coefvlm.
pneumo <- transform(pneumo, let = log(exposure.time))
fit1 <- vglm(cbind(normal, mild, severe) ~ let, propodds, data = pneumo)
coef(fit1, matrix = TRUE)
#> logitlink(P[Y>=2]) logitlink(P[Y>=3])
#> (Intercept) -9.676093 -10.581725
#> let 2.596807 2.596807
linkfun(fit1)
#> P[Y>=2] P[Y>=3]
#> "logitlink" "logitlink"
linkfun(fit1, earg = TRUE)
#> $link
#> P[Y>=2] P[Y>=3]
#> "logitlink" "logitlink"
#>
#> $earg
#> $earg$`P[Y>=2]`
#> $earg$`P[Y>=2]`$theta
#>
#>
#> $earg$`P[Y>=2]`$bvalue
#> NULL
#>
#> $earg$`P[Y>=2]`$inverse
#> [1] FALSE
#>
#> $earg$`P[Y>=2]`$deriv
#> [1] 0
#>
#> $earg$`P[Y>=2]`$short
#> [1] TRUE
#>
#> $earg$`P[Y>=2]`$tag
#> [1] FALSE
#>
#> attr(,"function.name")
#> [1] "logitlink"
#>
#> $earg$`P[Y>=3]`
#> $earg$`P[Y>=3]`$theta
#>
#>
#> $earg$`P[Y>=3]`$bvalue
#> NULL
#>
#> $earg$`P[Y>=3]`$inverse
#> [1] FALSE
#>
#> $earg$`P[Y>=3]`$deriv
#> [1] 0
#>
#> $earg$`P[Y>=3]`$short
#> [1] TRUE
#>
#> $earg$`P[Y>=3]`$tag
#> [1] FALSE
#>
#> attr(,"function.name")
#> [1] "logitlink"
#>
#>
fit2 <- vglm(cbind(normal, mild, severe) ~ let, multinomial, data = pneumo)
coef(fit2, matrix = TRUE)
#> log(mu[,1]/mu[,3]) log(mu[,2]/mu[,3])
#> (Intercept) 11.975092 3.0390622
#> let -3.067466 -0.9020936
linkfun(fit2)
#> [1] "multilogitlink"
linkfun(fit2, earg = TRUE)
#> $link
#> [1] "multilogitlink"
#>
#> $earg
#> $earg$multilogitlink
#> $earg$multilogitlink$M
#> [1] 2
#>
#> $earg$multilogitlink$refLevel
#> [1] 3
#>
#>
#>