TSE_TO_STS2: Transform a TSE timesequence to a STS timesequence

Description Usage Arguments Value

View source: R/hello.R

Description

This function transforms a matrix that contains sequential data in TSE (time stamped event sequences) format to a matrix in STS (state sequences) format. This function works like the TSE_TO_STS() function of the TraMineRextras package but differs in two points: If the passed dataset contains a sequence that is shorter than the longest sequence of the dataset TraMineRextras fills the missing values with the last non missing value. This function will not do this and let the missing values be NA. Furthermore it doesn't have a first state at the first value in the sequence. Please note that it is not necessary to use the function manually since the function is called from the create_time_sequence() function.

Usage

1
TSE_TO_STS2(TSE_sequence)

Arguments

TSE_sequence

A sequence in TSE format

Value

A matrix in STS format containing one sequence per row


githerbert/HMM documentation built on May 30, 2019, 12:46 p.m.