Description Usage Arguments Value
Define and fit discrete SuperLearner for longitudinal data. Model selection (scoring) can be based on MSE evaluated for random holdout observations (method = "holdout") or V-fold cross-validated MSE (method = "cv").
| 1 2 3 4 5 6 7 8 | fit(...)
## S3 method for class 'ModelStack'
fit(models, method = c("none", "holdout", "cv",
  "origamiSL", "internalSL"), data, ID, t_name, x, y, nfolds = NULL,
  fold_column = NULL, hold_column = NULL, hold_random = FALSE,
  seed = NULL, refit = TRUE, fold_y_names = NULL,
  verbose = getOption("gridisl.verbose"), ...)
 | 
| ... | Additional arguments that will be passed on directly to  | 
| models | Parameters specifying the model(s) to fit. This must be a result of calling  | 
| method | The type of model selection and model stacking procedure when fitting more than one model.
Possible options are:
 | 
| data | Input dataset, can be a  | 
| ID | A character string name of the column that contains the unique subject identifiers. | 
| t_name | A character string name of the column with integer-valued measurement time-points (in days, weeks, months, etc). | 
| x | A vector containing the names of predictor variables to use for modeling. If x is missing, then all columns except  | 
| y | A character string name of the column that represent the response variable in the model. | 
| nfolds | Number of folds to use in cross-validation. | 
| fold_column | The name of the column in the input data that contains the cross-validation fold indicators (must be an ordered factor). | 
| hold_column | The name of the column that contains the holdout observation indicators (TRUE/FALSE) in the input data. This holdout column must be defined and added to the input data prior to calling this function. | 
| hold_random | Logical, specifying if the holdout observations should be selected at random. If FALSE then the last observation for each subject is selected as a holdout. | 
| seed | Random number seed for selecting random holdouts or validation folds. | 
| refit | Set to  | 
| fold_y_names | (ADVANCED FEATURE) The names of columns in  | 
| verbose | Set to  | 
An R6 object containing the model fit(s).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.