Last chance! 50% off unlimited learning
Sale ends in
gaussianff(dispersion = 0, parallel = FALSE, zero = NULL)
object@misc$dispersion
; it is assigned the value
"vglmff"
(see vglmff-class
).
The object is used by modelling functions such as vglm
,
rrvglm
and vgam
.vglm
, else
vlm
is recommended instead.
The notation $M$ is used to denote the number of
linear/additive predictors.
This function can handle any finite $M$, and the default is to
use ordinary least squares.
A vector linear/additive model can be fitted by minimizing
weights
argument of
vlm
/vglm
/vgam
etc., and the
format is the matrix-band format whereby it is a $n \times
A$ matrix with the diagonals are passed first, followed by next
the upper band, all the way to the $(1,M)$ element. Here, $A$
has maximum value of $M(M+1)/2$ and a minimum value of $M$.
Usually the weights
argument of
vlm
/vglm
/vgam
/rrvglm
is just a vector,
in which case each element is multiplied by a order-$M$
identity matrix.
If in doubt, type something like weights(object, type="working")
after the model has been fitted.Yee, T. W. and Wild, C. J. (1996) Vector generalized additive models. Journal of the Royal Statistical Society, Series B, Methodological, 58, 481--493.
uninormal
,
huber2
,
lqnorm
,
binormal
,
SURff
.
vlm
,
vglm
,
vgam
,
rrvglm
.gdata <- data.frame(x2 = sort(runif(n <- 40)))
gdata <- transform(gdata, y1 = 1 + 2*x2 + rnorm(n, sd = 0.1),
y2 = 3 + 4*x2 + rnorm(n, sd = 0.1),
y3 = 7 + 4*x2 + rnorm(n, sd = 0.1))
fit <- vglm(cbind(y1,y2) ~ x2, gaussianff, data = gdata)
coef(fit, matrix = TRUE)
# For comparison:
coef( lmfit <- lm(y1 ~ x2, data = gdata))
coef(glmfit <- glm(y2 ~ x2, data = gdata, gaussian))
vcov(fit)
vcov(lmfit)
t(weights(fit, type = "prior")) # Unweighted observations
head(weights(fit, type = "working")) # Identity matrices
# Reduced-rank VLM (rank-1)
fit2 <- rrvglm(cbind(y1, y2, y3) ~ x2, gaussianff, data = gdata)
Coef(fit2)
Run the code above in your browser using DataLab