predictModel {demest} | R Documentation

## Use results from function estimateModel to make predictions.

### Description

Typically predict along time dimension, but can predict along other dimenions. When predicting along time dimension, typically predict forwards, but can predict backwards.

### Usage

    predictModel(
      filenameEst,
      filenamePred,
      along = NULL,
      labels = NULL,
      n = NULL,
      exposure = NULL,
      weights = NULL,
      data = NULL,
      aggregate = NULL,
      lower = NULL,
      upper = NULL,
      nBurnin = 0L,
      parallel = TRUE,
      outfile = NULL,
      verbose = FALSE,
      useC = TRUE
    )

### Arguments

`filenameEst` | Filename used to `estimateModel`.
`filenamePred` | Filename to be used by `predictModel`.
`along` | Name or index along which prediction should occur.
`labels` | Labels of new categories.
`n` | Number of new categories. Can only be used when predicting along `"time"`, `"age"`, or `"cohort"` dimensions, and when the units have equal length.
`exposure` | A `Counts` object specifying exposure or sample size.
`weights` | A `Counts` object containing weights.
`data` | A named list containing future values of covariates.
`aggregate` | An object of class `SpecAggregate`.
`lower` | A lower bound for estimates of data-level rates, probabilities, or means.
`upper` | An upper bound for estimates of data-level rate, probabilities, or means.
`nBurnin` | Number of iteration discarded before recording begins.
`parallel` | Logical. If `TRUE` (the default), parallel processing is used.
`outfile` | Where to direct the ‘stdout’ and ‘stderr’ connection output from the workers when parallel processing. Passed to function `[parallel]{makeCluster}`.
`verbose` | Logical. If `TRUE` (the default) a message is printed at the end of the calculations.
`useC` | Logical. If `TRUE` (the default), the calculations are done in C. Setting `useC` to `FALSE` may be useful for debugging.

### Details

If an `along` argument is not supplied, `predictModel` looks for a dimension with `dimtype` `"time"`, and, failing that, a dimension with `dimtype` `"age"`, or `"cohort"`.

When predicting along `"time"`, `"age"` or `"cohort"` dimensions, specifying an `n` argument is usually more convenient than specifying a `labels` argument.

`exposure` or `weights` arguments are needed if predictions for outcome variable `y`, and not just the model parameters, are needed.

[Package demest version 0.0.0.3.1 Index]