setDiscretization {magi} | R Documentation |
Set discretization level
Description
Set the discretization level of a data matrix for input to MagiSolver
, by inserting time points where the GP is constrained to the derivatives of the ODE system.
Usage
setDiscretization(dat, level, by)
Arguments
dat |
data matrix. Must include a column with name 'time'. |
level |
discretization level (a positive integer). |
by |
discretization interval. As an alternative to |
Details
Specify the desired discretization using level
or by
.
Value
Returns a data matrix with the same columns as dat
, with rows added for the inserted discretization time points.
Examples
dat <- data.frame(time = 0:10, x = rnorm(11))
setDiscretization(dat, level = 2)
setDiscretization(dat, by = 0.2)