Description Usage Arguments Details Value See Also Examples
View source: R/functions_utils.R
Updates a standata object with a matrix of time or exposure splines
1 2 3 | add_spline_time(standata, Mt)
add_spline_exposure(standata, Mx)
|
standata |
the standata object to be updated |
Mt, Mx |
the matrix of time or exposure splines to be added |
add_spline_time
updates the Mt
, timedf
, and Mt_attributes
elements of standata
. add_spline_exposure
updates the Mx
, xdf
, and Mx_attributes
elements of standata
.
The standata
object with updated elements.
create_standata_exposure
, create_standata_outcome
, expsim_update_parameter
, outsim_update_parameter
, create_spline
, create_spline_matrix
1 2 3 4 5 6 7 8 | exp_data <- create_standata_exposure(group=rep(1, 10),
conc=rnorm(10),
unit_id=rep(0:1, 5),
time=runif(10))
exp_data$Mt
Mt <- create_spline_matrix(exp_data$time, df=3, fn="ns")
exp_data <- add_spline_time(exp_data, Mt=Mt)
exp_data$Mt
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.