Calculate linear predictor $$\text{par}^\top X$$ where \(X\) is the design matrix specified by the formula
outcome_lp(
data,
mean = NULL,
par = NULL,
model = NULL,
offset = NULL,
treatment = NULL,
intercept = TRUE,
default.parameter = 0,
family = gaussian(),
remove = c("id", "num"),
...
)data.table
(data.table) Covariate data, usually the output of the covariate model of a Trial object.
formula specifying design from 'data' or a function that maps x to the mean value. If NULL all main-effects of the covariates will be used
(numeric) Regression coefficients (default zero). Can be given as
a named list corresponding to the column names of model.matrix
Optional model object (glm, mets::phreg, ...)
Optional offset variable name
Optional name of treatment variable
When FALSE the intercept will removed from the design matrix
when model and treatment is specified,
interaction terms between treatment and all other covariates in model
is added to the simulation model. default.parameter specifies the default
parameter of these extra parameters which can be changed individually with
the par argument.
family (default 'gaussian(identity)'). The inverse link-function is used to map the mean to the linear predictor scale (if mean is given as a function)
variables that will be removed from input data (if formula is not specified)
Additional arguments passed to mean function (see examples)