add_riskmodel: Add risk model to a psdesign object

Description Usage Arguments Details Examples

View source: R/pseval-constructors.R

Description

Add risk model to a psdesign object

Usage

1
add_riskmodel(psdesign, riskmodel)

Arguments

psdesign

A psdesign object

riskmodel

A risk model object, from the list above

Details

The risk model component specifies the likelihood for the data. This involves specifying the distribution of the outcome variable, whether it is binary or time-to-event, and specifying how the surrogate S(1) and the treatment Z interact and affect the outcome. We use the formula notation to be consistent with other regression type models in R. Below is a list of available risk models.

Examples

1
2
3
4
test <- psdesign(generate_example_data(n = 100), Z = Z, Y = Y.obs, S = S.obs, BIP = BIP) +
     integrate_parametric(S.1 ~ BIP)
add_riskmodel(test, risk_binary())
test + risk_binary() # same as above

sachsmc/pseval documentation built on May 29, 2019, 12:55 p.m.