Sequences: Lists state sequences in the data

Description Usage Arguments Details Value Author(s) Examples

Description

Produces a frequency table of the state sequences recorded in the data. The mean or median ages at transition are computed.

Usage

1
Sequences(Bdata,mean_median)

Arguments

Bdata

Biograph object

mean_median

Select mean or median age: "mean" or "median"

Details

The sequences are determined from the path variable in the data. The default age is the median age.

Value

Frequency table of sequences

Author(s)

Frans Willekens

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
#	Example 1: Sequences in GLHS
	data(GLHS)
	z <- Parameters (GLHS)
	seq <- Sequences (Bdata=GLHS,mean_median="median")
	
#	Example 2: Sequences in NLOG98
	data(NLOG98)
	z <- Parameters (NLOG98)
	seq <- Sequences (NLOG98) # default is median age
	
#	Example 3: State sequence in NLOG98, by birth cohort
	table(NLOG98$cohort)   # cohort size
	seq.1 <- Sequences(NLOG98[NLOG98$cohort=="<1960",],"median")
	seq.2 <- Sequences(NLOG98[NLOG98$cohort=="1960+",],"median")
	# Note that the sum(seq.2$ncase) equals size of second cohort	
	

Biograph documentation built on May 1, 2019, 8:48 p.m.