Description Usage Arguments Value

This internal function catches various potential errors in the user input in `gformula_survival`

, `gformula_continuous_eof`

, and `gformula_binary_eof`

.

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 | ```
error_catch(
id,
nsimul,
intvars,
interventions,
int_times,
int_descript,
covnames,
covtypes,
basecovs,
histvars,
histories,
compevent_model,
hazardratio,
intcomp,
time_points,
outcome_type,
time_name,
obs_data,
parallel,
ncores,
nsamples,
sim_data_b,
outcome_name,
compevent_name,
comprisk,
covmodels,
histvals,
min_time
)
``` |

`id` |
Character string specifying the name of the ID variable in |

`nsimul` |
Number of subjects for whom to simulate data. |

`intvars` |
List, whose elements are vectors of character strings. The kth vector in |

`interventions` |
List, whose elements are lists of vectors. Each list in |

`int_times` |
List, whose elements are lists of vectors. The kth list in |

`int_descript` |
Vector of character strings, each describing an intervention. |

`covnames` |
Vector of character strings specifying the names of the time-varying covariates in |

`covtypes` |
Vector of character strings specifying the "type" of each time-varying covariate included in |

`basecovs` |
Vector of character strings specifying the names of baseline covariates in |

`histvars` |
List of vectors. The kth vector specifies the names of the variables for which the kth history function
in |

`histories` |
Vector of history functions to apply to the variables specified in |

`compevent_model` |
Model statement for the competing event variable. |

`hazardratio` |
Logical scalar indicating whether the hazard ratio should be calculated between two interventions. |

`intcomp` |
List of two numbers indicating a pair of interventions to be compared by a hazard ratio.
The default is |

`time_points` |
Number of time points to simulate. |

`outcome_type` |
Character string specifying the "type" of the outcome. The possible "types" are: |

`time_name` |
Character string specifying the name of the time variable in |

`obs_data` |
Data table containing the observed data. |

`parallel` |
Logical scalar indicating whether to parallelize simulations of different interventions to multiple cores. |

`ncores` |
Integer specifying the number of cores to use in parallel simulation. |

`nsamples` |
Integer specifying the number of bootstrap samples to generate. |

`sim_data_b` |
Logical scalar indicating whether to return the simulated data set. If bootstrap samples are used (i.e., |

`outcome_name` |
Character string specifying the name of the outcome variable in |

`compevent_name` |
Character string specifying the name of the competing event variable in |

`comprisk` |
Logical scalar indicating the presence of a competing event. |

`covmodels` |
Vector of model statements for the time-varying covariates. |

`histvals` |
List of length 3. First element contains a vector of integers specifying the number of lags back for the lagged function. Second element contains a vector of integers indicating the number of lags back for the lagavg function. The last element is an indicator whether a cumavg term appears in any of the model statements. |

No value is returned.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.