Coef.RdCoef is a generic function which computes model
coefficients from objects returned by modelling functions.
It is an auxiliary function to coef that
enables extra capabilities for some specific models.
Coef(object, ...)This function can often be useful for vglm objects
with just an intercept term in the RHS of the formula, e.g.,
y ~ 1. Then often this function will apply the inverse
link functions to the parameters. See the example below.
For reduced-rank VGLMs, this function can return the A, C matrices, etc.
For quadratic and additive ordination models, this function can return ecological meaningful quantities such as tolerances, optimums, maximums.
The value returned depends specifically on the methods function invoked.
Yee, T. W. and Hastie, T. J. (2003). Reduced-rank vector generalized linear models. Statistical Modelling, 3, 15–41.
This function may not work for all VGAM family functions. You should check your results on some artificial data before applying it to models fitted to real data.
nn <- 1000
bdata <- data.frame(y = rbeta(nn, shape1 = 1, shape2 = 3)) # Original scale
fit <- vglm(y ~ 1, betaR, data = bdata, trace = TRUE) # Intercept-only model
#> Iteration 1: loglikelihood = 401.26873
#> Iteration 2: loglikelihood = 401.27885
#> Iteration 3: loglikelihood = 401.27885
coef(fit, matrix = TRUE) # Both on a log scale
#> loglink(shape1) loglink(shape2)
#> (Intercept) -0.04824494 1.010261
Coef(fit) # On the original scale
#> shape1 shape2
#> 0.9529004 2.7463170