rsim.DT: Random generation functions of doubly truncated data

Description Usage Arguments Details Value Author(s) Examples

View source: R/rsim.DT.R

Description

Random generation functions of doubly truncated data with two different patterns of observational bias.

Usage

1
rsim.DT(n,tau, model=NULL)

Arguments

n

number of observations to generate.

tau

length of the observational window.

model

model to be simulated. Number 1 or 2 corresponding to different patterns of observacional bias.

Details

If model=1, U\sim Unif(-\code{tau},1) and V= U+ tau. If model=2, U \sim Unif(0,1)^2\times (\code{tau}+1)-\code{tau} and V= U+ tau. In model=1 there is no observational bias due double truncation while in model=2 double truncation induces observational bias.

Value

A matrix with n unit length rows representing the generated values from a doubly truncated data with triplets (X, U and V), in which (U ≤q X ≤q V).

Author(s)

Carla Moreira, Jacobo de Uña-Álvarez and Rosa Crujeiras

Examples

1
rsim.DT(500,1/2, model=2)

DTDA documentation built on April 12, 2021, 1:06 a.m.