predict_ode {odeGUTS} | R Documentation |
Predict method for survFit
objects
Description
Function from the morse v 3.3.1
package.
This is a method
to replace function predict
used on survFit
object when computing issues happen. predict_ode
uses the deSolve
library to improve robustness. However, time to compute may be longer.
Function from the morse v 3.3.1
package.
This is the generic predict
S3 method for the survFit
class.
It provides predicted survival rate for "SD" or "IT" models under constant or time-variable exposure.
Function from the morse v 3.3.1
package.
This is a method
to replace function predict_Nsurv
used on survFit
object when computing issues happen. predict_nsurv_ode
uses the deSolve
library to improve robustness. However, time to compute may be longer.
Usage
predict_ode(object, ...)
## S3 method for class 'survFit'
predict_ode(
object,
data_predict = NULL,
spaghetti = FALSE,
mcmc_size = 1000,
hb_value = FALSE,
interpolate_length = 100,
interpolate_method = "linear",
hb_valueFORCED = 0,
...
)
predict_Nsurv_ode(
object,
data_predict,
spaghetti,
mcmc_size,
hb_value,
hb_valueFORCED,
extend_time,
interpolate_length,
interpolate_method,
...
)
## S3 method for class 'survFit'
predict_Nsurv_ode(
object,
data_predict = NULL,
spaghetti = FALSE,
mcmc_size = 1000,
hb_value = FALSE,
hb_valueFORCED = 0,
extend_time = 100,
interpolate_length = NULL,
interpolate_method = "linear",
...
)
Arguments
object |
An object of class |
... |
Further arguments to be passed to generic methods |
data_predict |
A dataframe with three columns |
spaghetti |
If |
mcmc_size |
Can be used to reduce the number of mcmc samples in order to speed up
the computation. |
hb_value |
If |
interpolate_length |
Length of the time sequence for which output is wanted. |
interpolate_method |
The interpolation method for concentration. See package |
hb_valueFORCED |
If |
extend_time |
Length of time points interpolated with variable exposure profiles. |
Value
The function returns an object of class survFitPredict
or
survFitPredict_Nsurv
with two items:
df_quantile |
Predicted quantiles (q50, qinf95, and qsup95) |
df_spaghetti |
Predicted survival curve (if spaghetti = |
Examples
library("odeGUTS")
data(fit_odeGUTS)
data_4prediction <- data.frame(time = 1:10,
conc = c(0,5,30,30,0,0,5,30,15,0),
replicate= rep("predict", 10))
predict_out <- predict_ode(object = fit_odeGUTS, data_predict = data_4prediction,
mcmc_size = 200, spaghetti = FALSE)