predict.doremi: S3 method to predict signal values in a DOREMI object when...

Description Usage Arguments Value Examples

Description

predict.doremi predicts signal values with a DOREMI object when providing a new excitation vector(s).

Usage

1
2
## S3 method for class 'doremi'
predict(object, ..., newdata, verbose = FALSE)

Arguments

object

DOREMI object result of an analysis with the function remi

...

Additional arguments inherited from generic predict method.

newdata

includes a data frame containing three columns or more:

id (optional), indicating the individual identifier

time, containing the time values

excitation, being one or several columns containing the different excitations used to estimate a new signal. As in the other methods for the predict function, the columns of newdata must have the same names as those of the original object.

verbose

Is a boolean that displays status messages of the function when set to 1.

Value

Returns a list containing the values of time, the values of the excitation and the predicted values of the signal for the new excitation(s).

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
myresult <- analyze.1order(data = cardio[id==1],
                 id="id",
                 input = "load",
                 time = "time",
                 signal = "hr")
#Copying cardio into a new data frame and modifying the excitation column
new_exc <- cardio[id==1]
et <- generate.excitation(amplitude = 100,
                          nexc = 6,
                          duration = 2,
                          deltatf = 1,
                          tmax = 49,
                          minspacing = 2)
new_exc$load <- et$exc
new_exc$time <- et$t
predresult <- predict(myresult, newdata = new_exc)

doremi documentation built on Jan. 29, 2021, 5:06 p.m.