break.VGAMextra: Names/Value of linear predictors/parameters in time series...

Description Usage Arguments Details Value Warning Warning Author(s) References See Also Examples

View source: R/break.VGAMextra.R

Description

Splitting out the names of linear predictors or Numeric values for parameters in time series family functions in VGAMextra.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
      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)

Arguments

eta

A matrix of dimensions c(n, M) storing the linear predictors values coming from the vglm fit. Here, M is the number of parameters. See warning below for further information.

M1

Number of parameters involved in the vglm fit.

noInter

Logical. To determine whether the intercept is estimated. If 'TRUE', the intercept is not estimated and set to 0.

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 vglm call.

lInter, lvar, lsd, lcoeff1, lcoeff2

Link functions applied to parameters. Same as in ARXff, or MAXff.

typeTS

Character. Currently, options "AR" for Autoregressive, and "MA" for Moving Average processes are handled.

namesLP

Logical. This function returns either the names of linear the predictors/parameters ( if namesLP = TRUE ) or parameter values (default) broken down from the eta matrix.

Complete

Logical. If TRUE, columns of zeros are incorporated into the matrix eta. See below for further details.

varArg

Sames as in ARXff or MAXff

Details

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.

Value

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.

Warning

Note that library VGAM is definitely required.

Warning

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.

Author(s)

Victor Miranda and T. W. Yee

References

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.

See Also

ARXff, MAXff, CommonVGAMffArguments, vglm.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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)

VGAMextra documentation built on May 24, 2021, 9:07 a.m.