Variable check for single objects.
Checking the variable and convert it for internal use, if necessary.
(Also used by the cointmonitoR
package.)
checkObject(obj, obj.name, ..., out = "return", .env)
obj |
[ |
obj.name |
[ |
... |
[ |
out |
[ |
.env |
[ |
Possible values of obj.name
to check:
"y"
, "x.stat"
:Of type numeric
, matrix
or data.frame
.
Only the first row/column will be used.
Converted to object: column matrix
"y.fm"
, "x.coint"
, "deter"
:Of type numeric
, matrix
or data.frame
.
Converted to object: column matrix
"m"
:Of type numeric(1)
, has to be greater than 0.
"model"
:One of c("FM", "D", "IM")
.
"signif.level"
:Of type numeric(1)
, has to be in the interval [0.01, 0.1].
"trend"
, "return.stats"
, "return.input"
,
"demeaning"
, "t.test"
:Converted to object: logical(1)
.
"kernel"
:One of c("ba", "bo", "da", "pa", "qs", "th", "tr")
.
"bandwidth"
:One of c("and", "nw")
.
"selector"
:One or both c(1, 2)
.
The checked and converted argument is assigned to
the given environment (.env
) and/or returned (depending on the
argument out
).
Other check: checkDoptions
,
checkVars
x = matrix(1:20, nrow = 2) x2 = checkObject(x, "x.coint") x2 env = environment() y = 1:10 checkObject(y, out = "assign", .env = env) y # example for the use of the ... argument: det = rbind(1, 1:10) x3 = sin(10:20) det2 = checkObject(deter = det) det2 (checkObject(deter = det, x.stat = x3))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.