simcont {predieval}R Documentation

Simulate data for a prediction model of a continuous outcome

Description

This function generates a dataframe with 6 patient covariates and a continuous outcome simulated from a model that uses the covariates.

Usage

simcont(Npat = 100)

Arguments

Npat

Number of patients to simulate.

Value

The function returns a dataframe with:

x1, x2, x3, x4, x5, x6= patient covariates.

t= treatment assignment (0 for control, 1 for active).

y.control= the outcome if the patient takes the control treatment.

y.active= the outcome if the patient takes the active treatment.

benefit= the treatment benefit, i.e. y.active-y.control.

y.observed= the observed outcome.

Examples

dat1=simcont(100)$dat
head(dat1)

[Package predieval version 0.1.1 Index]