Last chance! 50% off unlimited learning
Sale ends in
TypicalVGAMlinkFunction(theta, earg = list(), inverse = FALSE,
deriv = 0, short = TRUE, tag = FALSE)
theta
is character then inverse
and
deriv
are ignored.logoff
, this will
contain the offset value. The argument earg
is
always a listTRUE
the inverse link value
$\theta$ is returned, hence the argument
theta
is really $\eta$.blurb
slot of a
vglmff-class
object.
Used only if theta
is character, and gives the formula
for the link in character form.
If
Here are the general details.
If inverse = FALSE
and deriv = 0
(default) then the
ordinary link
function $\eta = g(\theta)$ is returned.
If inverse = FALSE
and deriv = 1
then it is
$d\theta / d\eta$
as a function of $\theta$.
If inverse = FALSE
and deriv = 2
then it is
$d^2\theta / d\eta^2$
as a function of $\theta$.
If inverse = TRUE
and deriv = 0
then the inverse
link function is returned, hence theta
is really
$\eta$.
If inverse = TRUE
and deriv
is positive then the
reciprocal of the same link function with
(theta = theta, earg = earg, inverse = TRUE, deriv = deriv)
is returned.
earg
for each link
argument.
In this help file
we have $\eta = g(\theta)$
where $g$ is the link function, $\theta$ is the parameter
and $\eta$ is the linear/additive predictor. The following is a brief enumeration of all
For parameters lying between 0 and 1 (e.g., probabilities):
logit
,
probit
,
cloglog
,
cauchit
,
fsqrt
,
logc
,
golf
,
polf
,
nbolf
.
For positive parameters (i.e., greater than 0):
loge
,
nloge
,
powl
.
For parameters greater than 1:
loglog
.
For parameters between $-1$ and $1$:
fisherz
,
rhobit
.
For parameters between $A$ and $B$:
elogit
,
logoff
($B = \infty$).
For unrestricted parameters (i.e., any value):
identity
,
nidentity
,
reciprocal
,
nreciprocal
.
TypicalVGAMfamilyFunction
,
vglm
,
vgam
,
rrvglm
.
cqo
,
cao
,
uqo
.logit("a")
logit("a", short = FALSE)
logit("a", short = FALSE, tag = TRUE)
logoff(1:5, earg = list(offset = 1)) # Same as log(1:5 + 1)
powl(1:5, earg = list(power = 2)) # Same as (1:5)^2
fit1 <- vgam(agaaus ~ altitude, binomialff(link = cloglog), hunua) # ok
fit2 <- vgam(agaaus ~ altitude, binomialff(link = "cloglog"), hunua) # ok
# This no longer works since "clog" is not a valid VGAM link function:
fit3 <- vgam(agaaus ~ altitude, binomialff(link = "clog"), hunua) # not ok
# No matter what the link, the estimated var-cov matrix is the same
y <- rbeta(n = 1000, shape1 = exp(0), shape2 = exp(1))
fit1 <- vglm(y ~ 1, beta.ab(lshape1 = "identity", lshape2 = "identity"),
trace = TRUE, crit = "c")
fit2 <- vglm(y ~ 1, beta.ab(lshape1 = logoff, eshape1 = list(offset = 1.1),
lshape2 = logoff, eshape2 = list(offset = 1.1)),
trace = TRUE, crit = "c")
vcov(fit1, untran = TRUE)
vcov(fit1, untran = TRUE) - vcov(fit2, untran = TRUE) # Should be all 0s
fit1@misc$earg # No 'special' parameters
fit2@misc$earg # Some 'special' parameters are here
par(mfrow = c(2,2))
p <- seq(0.01, 0.99, len = 200)
x <- seq(-4, 4, len = 200)
plot(p, logit(p), type = "l", col = "blue")
plot(x, logit(x, inverse = TRUE), type = "l", col = "blue")
plot(p, logit(p, deriv = 1), type = "l", col = "blue") # reciprocal!
plot(p, logit(p, deriv = 2), type = "l", col = "blue") # reciprocal!
Run the code above in your browser using DataLab