outsim_update_parameter: Update Outcome model parameters

Description Usage Arguments Details See Also

View source: R/functions_outcome_simulation.R

Description

Sets or overwrites outcome model parameters

Usage

 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", ...)

Arguments

obj

'outsim' object to update

param

character string giving name of parameter to update. If not provided, parameter name is taken from level and type

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 TRUE, then the parameter value is sampled instead of being set to value

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 draw=TRUE.

verbose

Set to FALSE to suppress messages.

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 ns

...

Additional arguments passed to create_spline_matrix.

Details

Only specific combinations of level and type are allowed. They are:

See Also

expsim_update_parameter

create_spline_matrix

Other outcome simulation functions: create_outcome_simulation_skeleton(), outsim_sample_observations(), sim_update_times()


jpkeller/bercs documentation built on March 24, 2021, 5:36 a.m.