trt: an expression that determine what is treated as the treatment. Everything not treatment is considered control.
...: add parameters as needed or use this to pass forward into the outcome_modeler.
group.data: The data for the group that is being analyzed. Preferably passed in as a single tibble that internally is subsetted/filtered as needed.
outcome_modeler: A separate function that may be swapped out to switch between negative-binomial, single index model, or another we will dream up in the future.
knots: knot locations for defining the spline basis.
id.var: The variable that identifies the patient.
outcome.var: The variable that contains the outcome.
time.var: The variable that contains the time.
alpha: The sensitivity parameter.
intensity.covariates: A formula representing modifications to the intensity model.
outcome.covariates: A formula representing modifications to the outcome model. The default removes the intercept term.
End: The end time for this data analysis, we need to set the default value as the max value of the time
integration.tolerance: The tolerance for the integration.
intensity.bandwidth: The bandwidth for the intensity model kernel.
influence.args: A list of additional arguments to pass to the influence function.
Returns
a list with class SensIAT-fulldata-fitted-model with two components, control and treatment, each of which is an independently fitted SensIAT-within-group-fitted-model fit with the fit_within_group_model function.
Should return everything needed to define the fit of the model. This can then be used for producing the estimates of mean, variance, and in turn treatment effect. For the full data model a list with two models one each for the treatment and control groups.
Details
This function should be agnostic to whether it is being provided a treatment or control group.
Functions
fit_SensIAT_fulldata_model(): Fit the sensitivity analysis for both treatment and control groups.
Examples
model <- fit_SensIAT_within_group_model( group.data = SensIAT_example_data, outcome_modeler = SensIAT_sim_outcome_modeler, alpha = c(-0.6,-0.3,0,0.3,0.6), id.var = Subject_ID, outcome.var = Outcome, time.var = Time, End =830, knots = c(60,60,60,60,260,460,460,460,460),)