mysimu: Function to simulation NCC data

View source: R/mysimu.R

mysimuR Documentation

Function to simulation NCC data

Description

Function to simulation NCC data

Usage

mysimu(N, yes.match = FALSE, m0, pi1)

Arguments

N

sample size.

yes.match

logical indicating whether the controls are selected with or without matching. The default value is FALSE.

m0

a numerical value which is the number of controls selected for each case.

pi1

the percentage of events that are selected as cases

Value

data a data.frame with the following variables: time (censored event time), status (censoring indicator), marker1 and marker2 (two markers), id (subjects' ID), case (indicator for sub-cohort case), control (indicator for sub-cohort control), CaseID (indicator which sub-cohort case that each subject is selected in the sub-cohort for).

If yes.match=TRUE, the list includes another two elements: aM (a vector of the matching constraint for each matching variable, i.e., a0) and Mdat (a data.frame including two matching variables).


michellezhou2009/NCCIPW documentation built on April 25, 2022, 3:39 p.m.