Rank
Rank.RdReturns the rank of reduced-rank regression-type models in the VGAM package.
Arguments
- object
Some VGAM object, for example, having class
rrvglm-class. The classvglm-classis not included since this is not based on reduced-rank regression.- ...
Other possible arguments fed into the function later (used for added flexibility for the future).
Details
Regression models based on reduced-rank regression have a quantity
called the rank, which is 1 or 2 or 3 etc.
The smaller the value the more dimension reduction, so that there
are fewer parameters.
This function was not called rank() to avoid conflict
with rank.
Note
This function has not been defined for VGLMs yet.
It might refer to the rank of the VL model matrix,
but for now this function should not be applied to
vglm fits.
See also
RR-VGLMs are described in rrvglm-class;
QRR-VGLMs are described in qrrvglm-class.
Examples
pneumo <- transform(pneumo, let = log(exposure.time),
x3 = runif(nrow(pneumo)))
(fit1 <- rrvglm(cbind(normal, mild, severe) ~ let + x3,
acat, data = pneumo))
#> Call:
#> rrvglm(formula = cbind(normal, mild, severe) ~ let + x3, family = acat,
#> data = pneumo)
#>
#> Coefficients:
#> (Intercept):1 (Intercept):2 let x3
#> -9.2184386 -3.4105224 2.1508694 0.4721274
#>
#> Residual deviance: 4.838786
#> Log-likelihood: -24.99624
coef(fit1, matrix = TRUE)
#> loglink(P[Y=2]/P[Y=1]) loglink(P[Y=3]/P[Y=2])
#> (Intercept) -9.2184386 -3.4105224
#> let 2.1508694 0.9650085
#> x3 0.4721274 0.2118246
constraints(fit1)
#> $`(Intercept)`
#> [,1] [,2]
#> [1,] 1 0
#> [2,] 0 1
#>
#> $let
#> [,1]
#> [1,] 1.0000000
#> [2,] 0.4486598
#>
#> $x3
#> [,1]
#> [1,] 1.0000000
#> [2,] 0.4486598
#>
Rank(fit1)
#> [1] 1