Update certain components of DualEndpoint
model with regard to parameters of the function that models dose-biomarker relationship defined in the DualEndpointBeta
class.
Source: R/helpers_model.R
h_model_dual_endpoint_beta.Rd
A simple helper function that takes DualEndpoint
object and updates
use_fixed
, priormodel
, modelspecs
, init
, sample
slots with regard
to a given parameter of the dose-biomarker relationship \(f(x)\) defined in
the DualEndpointBeta
class. This update solely depends on whether a given
parameter's value param
is a fixed-valued scalar or two-elements numeric
vector. In the later case, it is assumed that param
represents two
parameters of a probability distribution that will be used in priormodel
function to generate values for the param_name
parameter of \(f(x)\).
See the help page for DualEndpointBeta
class for more details.
Usage
h_model_dual_endpoint_beta(
param,
param_name,
param_suffix = c("_low", "_high"),
priormodel = NULL,
de
)
Arguments
- param
(
numeric
)
the value of a givenparam_name
parameter of the dose-biomarker relationship function \(f(x)\). Either a fixed-valued scalar or vector with two elements that are the parameters of a probability distribution that will be used inpriormodel
function to generate values for theparam_name
parameter of \(f(x)\).- param_name
(
string
)
the name of the parameter of \(f(x)\), whose value depends onparam
.- param_suffix
(
character
)
the two suffixes to be appended to the elements ofparam_name
and then used when updatingmodelspecs
. The value of this argument is ignored whenparam
is a scalar.- priormodel
(
function
orNULL
)
a function representing theJAGS
prior specification that will be appended to existingde@priormodel
specification ifparam
is not a scalar. Otherwise,de@priormodel
remains unchanged.- de
(
DualEnpoint
)
dual endpoint model whose slots will be updated.
Value
A DualEndpoint
model with updated use_fixed
, priormodel
,
modelspecs
, init
, sample
slots.