coef.deeptrafo {deeptrafo} | R Documentation |
S3 methods for deep conditional transformation models
Description
S3 methods for deep conditional transformation models
Usage
## 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,
pred_grid = FALSE,
...
)
## S3 method for class 'deeptrafo'
fitted(
object,
newdata = NULL,
batch_size = NULL,
convert_fun = as.matrix,
call_create_lags = TRUE,
...
)
## S3 method for class 'deeptrafo'
logLik(
object,
newdata = NULL,
convert_fun = function(x, ...) -sum(x, ...),
...
)
## S3 method for class 'deeptrafo'
residuals(object, newdata = NULL, return_gradients = FALSE, ...)
## 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
object |
Object of class |
which_param |
Character; either |
type |
Either NULL (all types of coefficients are returned),
"linear" for linear coefficients or "smooth" for coefficients of;
Note that |
... |
Further arguments supplied to |
newdata |
Named |
batch_size |
Integer; optional, useful if data is too large. |
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 |
pred_grid |
Logical; set TRUE, if user provides a predefined grid for an atp/atm model through newdata which holds two attributes. The first attribute, rname, should hold the column name (string) of the response variable while the second attribute, y, should hold the grid name. |
convert_fun |
Function; applied to the log-likelihood values of all observations. |
call_create_lags |
Logical; lags may already be computed by a different method (e.g. plot) |
return_gradients |
Return individual gradients instead of the summed
gradients; the residuals are |
nsim |
Integer; number of simulations; defaults to 1. |
seed |
Seed for generating samples; defaults to |
x |
Object of class |
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.