Predict and return responses as defined in the module.
sgl_predict(module_name, PACKAGE, object, data, responses = NULL,
auto_response_names = TRUE, ...)
reference to objective specific C++ routines.
name of the calling package.
a sgl object containing a list of estimated models.
a list of data objects -- will be parsed to the specified module.
a vector of responses to simplify and return (if NULL (deafult) no formating will be done)
set response names
not used.
list of lists structured as described in details. Content of the response elements will depend on the C++ response class
the lambda sequence used.
If no formating is done (i.e. if responses = NULL
)
then the responses
field contains a list of lists structured in the following way:
sample 1
model (lambda) index 1
response elements
model (lambda) index 2
response elements
...
sample 2
model (lambda) index 1
response elements
model (lambda) index 2
response elements
...
...
If responses = "rname"
with rname
the name of the response then a list at responses$rname
will be returned.
The content of the list will depend on the type of the response.
scalar: a matrix of size \(n \times d\) with the responses (where \(n\) is the number of samples and \(d\) the length of the lambda sequence).
vector: a list of length \(d\) with each element a matrix of dimension \(n \times q\) containing the responses for the corresponding model (where \(q\) is the dimension of the response).
matrix: a list with format samples -> models - > the response matrix.