Learn R Programming

Biograph (version 1.0)

p.OverviewEpisodes: Overview of episodes

Description

Produces a number of standard tables that summarize information on open and closed episodes. The function print.OverviewEpisodes tabulates summary measures on the episodes in the life history data. The tabulations include the number of episodes, the types of episodes (open or closed) and the durations of episodes.

Usage

p.OverviewEpisodes(survey, seq.ind, file.in,path,file.out)

Arguments

survey
input data: Biograph object
seq.ind
individual state sequences
file.in
Data file used as input
path
path to directory where output should be stored
file.out
name of output file. The table is saved as a text file

Details

Open intervals start before onset of observation (left truncated) or end after observation ended (right censored). Closed intervals start and end during the observation period. The function print.OverviewEpisodes uses the sink function of the R base. The function diverts R output to a file connection. The use of sink comes with a number of pitfalls. The reader is referred to the R documentation.

References

Willekens (2011)

Examples

Run this code
data (GLHS)
 z<- Parameters (GLHS)
 ist <- statesequence.ind (GLHS)
 path1 <- getwd() # path to current directory
 z <- p.OverviewEpisodes (survey=GLHS,seq.ind=ist,file.in="data.in",path=path1,file.out="TabEpisodes.out")

Run the code above in your browser using DataLab