Description Usage Arguments Details Value
generic function with
a default method, and additional methods for classes
lm, randomForest, rq (from package quantreg).
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 31 | as.murphydiag(x, ...)
## Default S3 method:
as.murphydiag(x, y = NULL, type = NULL,
level = NULL, m = NULL, xnames = NULL, ...)
## S3 method for class 'data.frame'
as.murphydiag(x, y = NULL, type = NULL,
level = NULL, m = NULL, xnames = NULL, ...)
## S3 method for class 'murphydiag'
as.murphydiag(x, y = NULL, type = NULL,
level = NULL, m = NULL, tol = sqrt(.Machine$double.eps), ...)
## S3 method for class 'lm'
as.murphydiag(x, y = NULL, type = NULL, level = NULL,
m = NULL, xnames = NULL, newdata = NULL, ...)
## S3 method for class 'rq'
as.murphydiag(x, y = NULL, type = NULL, level = NULL,
m = NULL, xnames = NULL, newdata = NULL, ...)
## S3 method for class 'randomForest'
as.murphydiag(x, y = NULL, type = NULL,
level = NULL, m = NULL, xnames = NULL, newdata = NULL, ...)
is.murphydiag(x)
simplifyFunctional(m, tol = sqrt(.Machine$double.eps))
generalizeFunctional(m)
|
x |
any R object. |
y |
a numeric vector of response values to be predicted. |
type |
a string specifying the type of forecast; one of |
level |
a single numeric value for the level of the |
m |
an object inheriting from the class |
xnames |
a character vector of prediction names. |
tol |
accuracy when comparing |
newdata |
an optional data frame used as environment in which to evaluate |
In the default version, the user specifies all relevant information (forecasts, realizations,
information on the type of forecast) manually. Furthermore, murphydiag accepts fitted model objects
from a few other packages:
“lm”, see lm
“rq”, see rq
“randomForest”, see randomForest
as.murphydiag.randomForest converts the classification problem to a binary problem with the first class treated as 1 and all other classes as 0
as.murphydiag returns a 'murphydiag' object.
is.murphydiag returns TRUE if its argument is a
Murphy diagram, that is, has "murphydiag" among its classes,
and FALSE otherwise.
simplifyFunctional coerces type and level of a
'murphydiag' object from "quantile" to "median",
or "expectile" to "mean", if possible. That is,
when level is close enough to 0.5.
generalizeFunctional coerces type of a 'murphydiag'
object from "prob" or "mean" to "expectile" with
level at 0.5, or "median" to "quantile" with
level at 0.5.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.