make.qcov {extRemes} | R Documentation |
Covariate Matrix for Non-Stationary EVD Projections
Description
Create a matrix for use with pextRemes
.
Usage
make.qcov(x, vals, nr = 1, ...)
is.qcov(x)
Arguments
x |
|
vals |
Either a named list whose names match the fitted model parameter names, or may be “threshold”, a matrix or a numeric vector of length equal to the size of the resulting matrix. |
nr |
The number of rows desired in the resulting matrix. Only if |
... |
optional arguments to |
Details
Simply sets up a matrix of parameter coefficients to be used by pextRemes
. In particular, all parameters/thresholds that are constant (i.e., do not depend on covariate values) should have columns of all ones. Paramters/threshold that vary in a non-stationary model may have whatever values are of interest.
is.qcov
performs some very simple tests to determine if an object is a proper qcov
matrix or not. It is possible to have a matrix that is not a proper qcov
matrix, but the returned value is TRUE. It is also possible to have a valid qcov
object that id not appropriate for a particular model. Mostly this is an internal function.
Value
An nr by np + 1 matrix is returned, where np is the number of parameters in the model. The last column is always “threshold” even if the model does not take a threshold (e.g., the GEV df), in which case the last column may be all NA, 0, or some other value depending on the vals argument.
Author(s)
Eric Gilleland
See Also
Examples
data(PORTw)
fit <- fevd(TMX1, PORTw, location.fun=~AOindex, units="deg C")
fit
v <- cbind(rep(1,4), c(1, -1, 1, -1), rep(1,4), rep(1,4))
v <- make.qcov(fit, vals=v, nr=4)
v
# cf.
v <- make.qcov(fit, vals=list(mu1=c(1, -1, 1, -1)))
v
# Or
v <- make.qcov(fit, vals=c(rep(1,4), c(1, -1, 1, -1), rep(1,8), rep(0,4)), nr=4)
v