Description Usage Arguments Details See Also
View source: R/functions_outcome_simulation.R
Sets or overwrites outcome model parameters
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | outsim_update_parameter(
obj,
param,
level = c("study", "unit", "time", "covariate", "exposure"),
type = c("mean", "sd", "re", "coef"),
value = NULL,
draw = is.null(value)
)
outsim_update_atrisk(obj, nT = 1)
outsim_update_covariate(
obj,
covariate = c("x", "Z"),
ncol = 1,
value = NULL,
draw = is.null(value),
verbose = TRUE,
mean = 0,
sd = 1
)
outsim_update_set_parameter(obj, param = c("beta", "gamma"), value = NULL)
outsim_update_exp_splines(obj, df = 1, fn = "ns", ...)
|
obj |
'outsim' object to update |
param |
character string giving name of parameter to update. If not provided, parameter name is taken from |
level |
character string of model level being updated. See details. |
type |
character string giving type of parameter being updated. See details. |
value |
value(s) to which parameter should be set |
draw |
if |
nT |
time at risk value to set |
covariate |
character string indicating which covariate to update. currently only 'x' and 'Z'. |
ncol |
number of columns in covariate matrix. only used if |
verbose |
Set to |
mean |
Mean of normal distribution from which to draw. |
sd |
SD of normal dsitirbtion from which to draw. |
df |
Degrees of freedom for exposure spline. |
fn |
Name of spline-generating function. Defaults to |
... |
Additional arguments passed to |
Only specific combinations of level
and type
are allowed. They are:
"group"
: "mean"
and "sd"
set 'etaG' and 'sigG', respectively
"cluster"
: "mean"
and "sd"
set 'etaK' and 'sigK', respectively
Other outcome simulation functions:
create_outcome_simulation_skeleton()
,
outsim_sample_observations()
,
sim_update_times()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.