survIC: Generate survival model objects

View source: R/simSurvIC.R

survICR Documentation

Generate survival model objects

Description

Function to generate a latent variable model for interval censored survival times.

Usage

survIC(scale.time = 1/100, shape.time = 1, n.inspections = 5,
  schedule = 10, punctuality = 5)

Arguments

scale.time

Weilbull scale for latent time

shape.time

Weilbull shape for latent time

n.inspections

Number of inspection times

schedule

Mean of the waiting time between adjacent inspections.

punctuality

Standard deviation of waiting time between inspections.

Details

Based on the functionality of the lava PACKAGE the function generates a latent variable model with a latent time and a censoring mechanism (censtime, inspection1,inspection2,...,inspectionK).

The function sim.survIC then simulates interval censored times.

Value

A latent variable model object lvm

Author(s)

Thomas Alexander Gerds

Examples

## Not run: 
library(lava)
library(prodlim)
# generate survival model based on exponentially
# distributed times
m <- survIC(scale.time=1/50, shape.time=0.7)
round(sim(m,6),1)

# Estimate the parameters of the Weibull models
# based on the uncensored exact event times
# and the uncensored illstatus.
set.seed(18)
d <- sim(m,100,latent=FALSE)
d$uncensored.status <- 1
f <- shr(Hist(time=list(L,R),event=uncensored.status)~1,
         data=d,
         conf.int=FALSE)
print(f)

## End(Not run)

tagteam/SmoothHazard documentation built on April 5, 2024, 6:32 a.m.