Learn R Programming

SensIAT (version 0.1.1)

SensIAT_sim_outcome_modeler: Outcome Modeler for SensIAT Single Index Model.

Description

Outcome Modeler for SensIAT Single Index Model.

Usage

SensIAT_sim_outcome_modeler(
  formula,
  data,
  kernel = "K2_Biweight",
  method = "nmk",
  id = ..id..,
  ...
)

Value

Object of class SensIAT::Single-index-outcome-model which contains the outcome model portion.

Arguments

formula

The outcome model formula

data

The data to fit the outcome model to. Should only include follow-up data, i.e. time > 0.

kernel

The kernel to use for the outcome model.

method

The optimization method to use for the outcome model, either "optim", "nlminb", or "nmk".

id

The patient identifier variable for the data.

...

Currently ignored, included for future compatibility.

Examples

Run this code
# \donttest{
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),
    )
# }

Run the code above in your browser using DataLab