View source: R/break.VGAMextra.R
break.VGAMextra | R Documentation |
Splitting out the names of linear predictors or Numeric values for parameters in time series family functions in VGAMextra.
break.VGAMextra(eta = NULL,
M1 = NULL,
noInter = NULL,
bOrder = NULL,
NOS = NULL,
lInter = "identitylink",
lvar = "loglink",
lsd = "loglink",
lcoeff1 = "rhobitlink",
lcoeff2 = "rhobitlink",
typeTS = "AR",
namesLP = FALSE,
Complete = FALSE,
varArg = NULL)
eta |
A matrix of dimensions |
M1 |
Number of parameters involved in the |
noInter |
Logical. To determine whether the intercept is
estimated. If |
bOrder |
A vector. The order of the linear process fitted. Either a single number (if one response), or a vector (if multiple responses). |
NOS |
Integer. Number of respones set in the |
lInter, lvar, lsd, lcoeff1, lcoeff2 |
Link functions applied to parameters. Same as in
|
typeTS |
Character. Currently, options |
namesLP |
Logical. This function returns either the names of linear the
predictors/parameters ( if |
Complete |
Logical. If |
varArg |
Sames as in |
Time series family functions in VGAMextra currently recycle
the order set in the vglm
.
Particularly, it occurs when the number of responses is fewer than
the specified order. For instance, if the order set in vglm
is c(1, 3)
, and 5 responses are managed, then the new order
becomes c(1, 3, 1, 3, 1)
.
Due to such flexibility, time series family functions require specific functions to unload the amount of code within each one.
Moreover, when the order is recycled, the matrix eta
is
completed, as if the order was the same for each response.
This feature is enabled when Complete = TRUE
.
This ‘common’ order turns out to be the maximum order established in
the vector order
. This trick makes the family function to work
properly. To return to the riginal ‘order’, eta
is reduced
in the same number of colums initially added.
break.VGAMextra
works in this context. It may return either
the names of the linear predictors/parameters, or the parameter values
splitted out as a list. Thus, link functions entered in the vglm
call must be passed down to this functions.
For further details on link functions refer to
CommonVGAMffArguments
.
A list containing either the names of the linear predictors or the
parameters values (not linear predictors) unwrapped from tje
eta
matrix, as follows:
a) If namesLP = FALSE
(default), value of parameters are
returned in this order: the intercept (1), standard deviation and
variance of the white noise (2, 3), and the coefficients (4).
b) If namesLP = TRUE
, names of linear predictors are
returned in the first entry, whereas parameter names are
allocated to the second entry.
Yee and Wild (1996) provide more detailed information about the relationship between linear predictors and parameters within the VGLM statistical framework.
Note that library VGAM is definitely required.
Be aware of the dimensions of matrix eta
. It is c(n, M)
,
where n
is the sample size, and M
is the number of
parameters. If multiple responses, then M
equals the summation
of parameters individually.
Victor Miranda and T. W. Yee
Yee, T. W. and Wild, C. J. (1996) Vector Generalized Additive Models. Journal of the Royal Statistical Society, Series B, Methodological, 58(3), 481–493.
ARXff
,
MAXff
,
CommonVGAMffArguments
,
vglm
.
library(VGAM)
eta <- matrix(runif(100), nrow = 10, ncol = 10)
M1 <- c(5, 5)
noInter <- FALSE
bOrder <- c(3, 3)
NOS <- 2
### ONLY LINEAR PREDICTORS/PARAMETERS NAMES!
### RETURNED OBJECT IS A LIST !
break.VGAMextra(M1 = M1,
noInter = noInter,
bOrder = bOrder,
NOS = NOS,
typeTS = "AR",
namesLP = TRUE,
varArg = TRUE)
### PARAMETER VALUEs... "UNWRAPPED". Inverse link functions are applied.
### Note that namesLP must be set to FALSE
break.VGAMextra(eta = eta,
M1 = M1,
noInter = noInter,
bOrder = bOrder,
NOS = NOS,
typeTS = "AR",
namesLP = FALSE,
varArg = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.