setTheta {copula} | R Documentation |
Set or change the parameter theta (theta
) of
a copula. The name ‘theta’ has been from its use in (nested)
Archimedean copulas, where x
is of class
"acopula"
or
"outer_nacopula"
. This is used for constructing
copula models with specified parameter, as, for example, in
onacopula()
.
setTheta(x, value, ...) ## S4 method for signature 'acopula,ANY' setTheta(x, value, na.ok = TRUE, noCheck = FALSE, ...) ## S4 method for signature 'copula,ANY' setTheta(x, value, na.ok = TRUE, noCheck = FALSE, ...) ## S4 method for signature 'outer_nacopula,numeric' setTheta(x, value, na.ok = TRUE, noCheck = FALSE, ...)
x |
an R object of class |
value |
parameter value or vector, |
... |
further arguments for methods. |
na.ok |
logical indicating if |
noCheck |
logical indicating if parameter constraint checks should be skipped. |
an R object of the same class as x
, with the main parameter (vector)
(often called theta
) set to value
.
Martin Maechler
myC <- setTheta(copClayton, 0.5) myC # negative theta is ok for dim = 2 : myF <- setTheta(copFrank, -2.5, noCheck=TRUE) myF@tau(myF@theta) # -0.262 myT <- setTheta(tCopula(df.fixed=TRUE), 0.7) stopifnot(all.equal(myT, tCopula(0.7, df.fixed=TRUE), tolerance=0)) (myT2 <- setTheta(tCopula(dim=3, df.fixed=TRUE), 0.7)) ## Setting 'rho' and 'df' --- for default df.fixed=FALSE : (myT3 <- setTheta(tCopula(dim=3), c(0.7, 4)))