Learn R Programming

pscDesign (version 1.0.0)

dataSim: Study design using Personalised Synthetic Controls

Description

pscDesign performs the simulations required to estimate the Power of a study designed using personalised synthetic controls.

Usage

dataSim(CFM, n0 = 0, n1 = 100, beta = 0, fuTime, recTime, rec = NULL)

Value

A data frame intended for use with the CFM including covariate and outcome data

Arguments

CFM

a Counter-Factual model

n0

number of patients allocated to the control arm (defaults to 0 - i.e. single arm study).

n1

number of patients allocated to the experimental arm

beta

the (log) HR used in the study design

fuTime

Follow up time for the study design

recTime

Recruitment time for the study design

rec

a study recruitment estimate obtained using the recForcast() function. If specified, recTime will be ignored.

Details

The datSim function simulates a dataset including sampled covariatees and outcome data from a counterfactual model

Time parameters (fuTime, recTime) should be expressed on the same scale on which they are specified in the Counter Factual Model. One of recTime or rec must be specified. If rec is specified, recTime will be ignored.

Examples

Run this code
gemCFM <- pscDesign::gemCFM
dataSim(gemCFM,n0=10,n1=20,beta=log(0.7),fuTime=12,recTime=12)

Run the code above in your browser using DataLab