rmse_calculate function

Calculate RMSE for Covariate, Outcome, and Competing Risk Models

Calculate RMSE for Covariate, Outcome, and Competing Risk Models

This internal function calculates root mean square error (RMSE) for the covariate (and the outcome and competing event, if applicable) models fit on the observed data.

rmse_calculate(i, fits, covnames, covtypes)

Arguments

  • i: Integer specifying the index of fits.
  • fits: List of fitted models.
  • covnames: Vector of character strings specifying the names of the time-varying covariates in obs_data.
  • covtypes: Vector of character strings specifying the "type" of each time-varying covariate included in covnames. The possible "types" are: "binary", "normal", "categorical", "bounded normal", "zero-inflated normal", "truncated normal", "absorbing", "categorical time", and "custom".

Returns

The RMSE for the model.