UtilitiesVGAMextra  R Documentation 
A set of common utility functions required by time series family functions at 'VGAMextra'.
Is.Numeric(x, isInteger = FALSE, length.arg = NULL, Nnegative = NULL)
is.FormulaAR(Model = ~ 1, Resp = 1)
cross.gammas(x, y = NULL, lags = 1)
WN.lags(y, lags, to.complete = NULL)
extract.Residuals(object, TSprocess,...)
fittedVGAMextra(object,...)
weightsVGAMextra(object, type.w = "prior",...)
XLMmat(object,...)
x 
A vector of quantiles. Particularly, for 
y 
Vector of quantiles to be lagged. Then, the cross  covariances
are computed from 
isInteger 
Logical. If 
lags 
Integer indicating the number of lags or delays to be applied to
vector 
length.arg 
Integer. If 
Model 
Formula. A symbolic form of the models fitted by the 
Nnegative 
Logical. If 
Resp 
Integer. The number of responses in the 
object 
An object of class 
TSprocess 
Logical, what time series model is being fitted.
Choices are

type.w 
Character. What type of 
to.complete 
Use this argument to fill in the first 'p' observations when computing the lagged vectors in time series. 
... 
Additional parameters required by function

A set of utility functions in VGAMextra for different purposes.
Specially for time series family functions in VGAMextra which involve specific checks on the majority of arguments entered by the user.
Is.Numeric()
returns a logical vector (or value)
(TRUE
or FALSE
), after verifying whether quantiles
x
satisfies all conditions entered.
For is.FormulaAR()
, this function returns a logical value,
after verifying whether the expression entered for the Model
argument in cm.ARMA
is an
object of class 'formula
'.
Particularly, cross.gammas()
computes either the single lagged
covariance(s) from quantiles given in x
or the
lagged crosscovariance(s) from values given in x
and y
.
extract.Residuals()
extracts the residuals of the process from
slot @residuals
, whilst
fittedVGAMextra
and weightsVGAMextra
return the
fitted values and the weights from the vglm
object,
correspondingly.
isNA
and inspectVGAMextra
are essentially required when
implementing link functions in VGAMextra.
V. Miranda and T. W. Yee.
cm.ARMA
.
# Example 1.
myModel1 < ~ x1 + x2
is.FormulaAR(myModel1) # TRUE
test < list( cbind(y1, y2) ~ x1, ~ x2  1)
is.FormulaAR(test) # FALSE
is.FormulaAR(test[[1]], 2) # TRUE
# Example 2.
x1 < c(1:3, 4.5, Inf)
Is.Numeric(x1) # TRUE
Is.Numeric(x1, length.arg = 5) # TRUE
Is.Numeric(x1, length.arg = 5, isInteger = TRUE) # FALSE
Is.Numeric(x1, length.arg = 5, Nnegative = TRUE) # FALSE
# Example 3.
# Here, 'cross.gammas' computes Cov(x, y_{t  1}), Cov(x, y_{t  2}) and
# Cov(x, y_{t  3}).
x < runif(50)
y < runif(50)
cross.gammas(x, y, lags = 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.