predict.tdmore_mpc: MPC predict method. This simply generates a cumulative sum...

Description Usage Arguments Value

View source: R/mpc.R

Description

MPC predict method. This simply generates a cumulative sum for all

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## S3 method for class 'tdmore_mpc'
predict(
  object,
  newdata,
  regimen = NULL,
  parameters = NULL,
  covariates = NULL,
  se = FALSE,
  level = 0.95,
  ...
)

Arguments

object

Object of class inheriting from 'tdmore'

newdata

Data.frame of new data with at least a TIME column, and additional columns. Any columns that match the model output will be replaced by the predicted values. Alternatively, a numeric vector used as TIME. The resulting data.frame will contain all values predicted by the model.

regimen

Treatment regimen, or NULL for no treatment

parameters

A named numeric vector with the parameter values to use. Any model parameters that are not provided are assumed '0'.

covariates

a named numeric vector with the covariates to use. Alternatively, a data.frame with column 'TIME' and columns with time-varying covariates. The first row of the data.frame should be time 0.

se

TRUE to generate an additional xx.upper and xx.lower column for every xx column in the data dataset

level

numeric value to specify the confidence interval

...

extra arguments for the call to the model

Value

a data.frame with all observed values at the given time points


tdmore-dev/tdmore documentation built on Jan. 1, 2022, 3:21 a.m.