simPA: Simulates minutes of physical activity per day

View source: R/simPA.R

simPAR Documentation

Simulates minutes of physical activity per day

Description

Simulates minutes of physical activity per day with realistic missing data patterns

Usage

simPA(n, type, beta, minday, maxday)

Arguments

n

Number of individuals in the simulated data.

type

Whether to simulate data from informative/non-informative observation/censoring patterns. Options: i) 'inf', ii) 'noninf'.

beta

True coefficient for the binary covariate.

minday

Minimun number of observation days.

maxday

Maximum number of observation days.

Value

A simulated dataset is returned with four columns: [ID, day, min, x1, z].

Author(s)

Jaejoon Song <jjsong2@mdanderson.org>

Examples

##
## Simulauting data for a single individual 
## with noninformative observation patterns
##
simdata <- simPA(n=1, beta=1.5,type='noninf', minday=6, maxday=7)


github-js/acc documentation built on Aug. 21, 2023, 5:40 p.m.