plot.deeptrafo {deeptrafo} | R Documentation |
Generic methods for neural network transformation models
Description
Generic methods for neural network transformation models
Usage
## S3 method for class 'deeptrafo'
plot(
x,
which = NULL,
type = c("smooth", "trafo", "pdf", "cdf"),
newdata = NULL,
which_param = c("shifting", "interacting"),
only_data = FALSE,
K = 40,
q = NULL,
...
)
## S3 method for class 'deeptrafo'
coef(
object,
which_param = c("shifting", "interacting", "autoregressive"),
type = NULL,
...
)
## S3 method for class 'deeptrafo'
predict(
object,
newdata = NULL,
type = c("trafo", "pdf", "cdf", "interaction", "shift", "terms"),
batch_size = NULL,
K = 100,
q = NULL,
...
)
## S3 method for class 'deeptrafo'
fitted(object, newdata = NULL, batch_size = NULL, convert_fun = as.matrix, ...)
## S3 method for class 'deeptrafo'
logLik(
object,
newdata = NULL,
convert_fun = function(x, ...) -sum(x, ...),
...
)
## S3 method for class 'deeptrafo'
simulate(object, nsim = 1, seed = NULL, newdata = NULL, ...)
## S3 method for class 'deeptrafo'
print(x, print_model = FALSE, print_coefs = TRUE, with_baseline = FALSE, ...)
## S3 method for class 'deeptrafo'
summary(object, ...)
Arguments
x |
Object of class |
which |
Which effect to plot, default selects all smooth effects in the shift term. |
type |
Either NULL (all types of coefficients are returned),
"linear" for linear coefficients or "smooth" for coefficients of;
Note that |
newdata |
Named |
which_param |
Character; either |
only_data |
Logical, if |
K |
Integer; grid length for the response to evaluate predictions at,
if |
q |
Numeric or factor; user-supplied grid of response values to evaluate
the predictions. Defaults to |
... |
Further arguments supplied to |
object |
Object of class |
batch_size |
Integer; optional, useful if data is too large. |
convert_fun |
Function; applied to the log-likelihood values of all observations. |
nsim |
Integer; number of simulations; defaults to 1. |
seed |
Seed for generating samples; defaults to |
print_model |
Logical; print keras model. |
print_coefs |
Logical; print coefficients. |
with_baseline |
Logical; print baseline coefs. |
Details
If no new data is supplied, predictions are computed on the training
data (i.e. in-sample). If new data is supplied without a response,
predictions are evaluated on a grid of length K
.
Value
Returns vector or matrix of predictions, depending on the supplied
type
.
Returns matrix of fitted values.