Skip to main content

Questions tagged [traminer]

The R TraMineR library is a toolkit for exploring and rendering categorical sequence data such as sequences describing family life trajectories or professional careers. This CV "traminer" tag is intended for conceptual questions about the analyses that can be done with the library as well as more general questions about sequence analysis. For TraMineR coding questions use the "traminer" tag under StackOverflow.

Filter by
Sorted by
Tagged with
10 votes
1 answer
9k views

Do low silhouette widths mean the data has little underlying structure?

I am new to sequence analysis, and I was wondering how you react if the average silhouette widths (ASW) from cluster analyses of Optimal Matching-based dissimilarity matrices are low (around.25). ...
JeremyR's user avatar
  • 151
8 votes
1 answer
1k views

When and how to use weights for sequence analysis in social science?

Weighting in sequence analysis So far, I have scarcely found papers that address the issue of weighting for sequence analysis (using for example the optimal matching algorithm). Sequence analysis ...
non-numeric_argument's user avatar
6 votes
2 answers
1k views

Should normalization completely weed out correlation?

I have two variables: ordering & length. The former measures the ordering of a sequence (i.e. all permutations of A-B-C), and the former is the length of the sequence (i.e. A-B-C has a length of 3)...
histelheim's user avatar
  • 3,023
6 votes
1 answer
1k views

Index plot for each cluster sorted by the silhouette

After a cluster analysis I´m trying to plot for each cluster the Index plot of the Silhouette value instead of for the complete dataset (like in the WeightedCluster Library Manual by Matthias Studer)....
emanuela.struffolino's user avatar
6 votes
2 answers
797 views

Other substitution matrices for missing value state in sequence analysis with TraMineR?

We have a question about how to deal with missing values/gaps within sequences. We like to set up our own substitution-cost matrix for the Optimal Matching process. As far as we know, TraMiner allows ...
Oliver's user avatar
  • 71
6 votes
1 answer
292 views

How to find the rows that meet some conditions in a sequence data set

Here is the summary of my sequence data generated in the SPELL format. All sequences are supposed to have the same length of 1440, but the summary tells me that they are not the same (see "min/max ...
POTENZA's user avatar
  • 361
6 votes
1 answer
1k views

What's the algorithm for finding sequences used by TraMineR?

I'm working an analysis about finding frequent sequences in a event-state dataset using the R package TraMineR (and ...
Stefan's user avatar
  • 63
5 votes
2 answers
421 views

Modifying the time granularity of a state sequence

I created a sequence object from my SPELL-formatted data set. The sequence length of the sequence object is 1440 (i.e., 1-min intervals for a day). Is there any easy way for TraMineR to convert the ...
POTENZA's user avatar
  • 361
5 votes
1 answer
1k views

Problems with Groups in Traminer

I'm having a problem using the group function in TraMineR. I have a data set that contains SPELL data, so multiple rows per case. I also have demographic data per case, at one row per case. I merge ...
mCorey's user avatar
  • 363
5 votes
1 answer
2k views

How to describe multi-channel sequence objects in TraMineR?

I have created a multi-channel object here: https://github.com/aronlindberg/VOSS-Sequencing-Toolkit/blob/master/creating_multichannel_object.R However, when I try to use various functions to ...
histelheim's user avatar
  • 3,023
5 votes
1 answer
498 views

Sequence analysis - Clusters quality - Time Use

I am trying to run sequence clustering on time use data but I fail to have "acceptable" clustering solution according to Studer (2010). The sequences have 76 episodes of 15 minutes slots (12 states)....
giac's user avatar
  • 911
5 votes
1 answer
1k views

How to estimate the centroid of clustered sequences?

I have run a sequence analaysis using the Optimal Matching algorithm. Afterwards, I have clustered the resulting distance matrice using the Ward algorithm and calculated silhouettes as measures of ...
non-numeric_argument's user avatar
5 votes
1 answer
1k views

What is the relationship between substitution cost matrix and indel costs?

In TraMineR I might compute dissimilarities as such: ...
histelheim's user avatar
  • 3,023
5 votes
1 answer
60 views

Separate opening and extension penalties for indels

ClustalG, the social science version of ClustalX, can use different 'opening' and 'extension' penalties for indels, so that an indel operation can have more weight when it adds the first element for a ...
POTENZA's user avatar
  • 361
5 votes
1 answer
4k views

Analyzing Sankey diagrams statistically?

Sankey diagrams are helpful for visualizing multiple, interacting processes: Are there any statistical tools available that can analyze the interactions of multiple processes? I'm aware of sequence ...
histelheim's user avatar
  • 3,023
4 votes
2 answers
312 views

how to randomly select 5% of the sample

The number of sequences in my sequence data is about 5,000, and the sequence length is 1440. In order to reduce computational time to obtain an optimal matching pairwise matrix, I want to randomly ...
POTENZA's user avatar
  • 361
4 votes
2 answers
232 views

minimum criteria for datasets used with TraMineR

I posted this to the TraMineR user list and it was suggested that it would be appropriate to post it here as well. Any suggestions as to how to determine the minimum dataset size and missingness ...
Shawn's user avatar
  • 43
4 votes
2 answers
746 views

Comparing clustering of sequences in datasets with different N?

When doing sequence analysis using a package such as TraMineR, one can calculate a clustering based on Optimal Matching (OM) distances, and then plot it as a tree. ...
histelheim's user avatar
  • 3,023
4 votes
2 answers
2k views

Measuring entropy for event sequences?

In TraMineR the function seqient() for calculating the entropy of a sequence object is not available for event sequences (as ...
histelheim's user avatar
  • 3,023
4 votes
2 answers
229 views

Position-dependent substitution cost matrix for sequence alignment

Many sequence alignment algorithms and those which measure similarity between sequences require specification of a cost matrix defined on the sequence alphabet. However, the cost incurred does not ...
curryage's user avatar
  • 263
4 votes
1 answer
2k views

Comparing two sequence objects?

Using TraMineR, is it possible to compare two sequence objects to calculate the discrepancy between them? By this I mean not comparing two sequences but two sets of ...
histelheim's user avatar
  • 3,023
4 votes
1 answer
102 views

Dummycoding based on clustering from OM distances

I'm using TraMineR to determine a certain clustering based on Optimal Matching distances: ...
histelheim's user avatar
  • 3,023
4 votes
1 answer
534 views

Legend and TraMiner seqplot.tentrop function

I have a problem with the legend of a TraMineR graph. I have computed the 4 different entropies for the 4 cohorts that I'm analyzing and I would like to plot them in the same graph using the ...
emanuela.struffolino's user avatar
4 votes
1 answer
709 views

Why use K-medoids for sequence analysis?

In the package WeightedCluster there seems to be facilities for using K-medoids clustering (i.e. wcKMedoids()), but not the more ...
histelheim's user avatar
  • 3,023
4 votes
2 answers
261 views

How to interpret p-values in output of seqecmpgroup()?

The seqecmpgroup() function returns a table that, among other things, include p-values for each identified subsequence. How should these be interpreted? I can see ...
histelheim's user avatar
  • 3,023
4 votes
1 answer
375 views

How to measure multichannel distances between "event" sequences?

In TraMineR, seqdistmc is used to measure multichannel distances between "state" sequences. I am wondering if there is a function to measure multichannel distances between "event" sequences.
POTENZA's user avatar
  • 361
4 votes
1 answer
1k views

Entropy of state distribution, complexity index and turbulence for sequences of varying length

I have a dataset of varying sequence lengths and want to calculate descriptive measured for it. The main cause of differing lengths is that some cases are right censored, and are dealt properly when ...
Kenji's user avatar
  • 858
4 votes
1 answer
374 views

Sampling from sequence data

I work with 4 sequence datasets that I want to compare. The datasets range from roughly 150 to 2000 sequences. I've been able to use TraMineR on datasets up to 1000 sequences long, but when I try to ...
histelheim's user avatar
  • 3,023
4 votes
2 answers
784 views

User Defined Substitution Cost Matrix

I have a 30x30 symmetric matrix that I would like to use as a substitution cost matrix in TraMineR to analyze sequences of length 10 with an alphabet of 30. When I try to perform OM with this matrix, ...
JeremyR's user avatar
  • 151
4 votes
1 answer
135 views

Bootstrap the Complexity Index in (Ex)TraMineR?

I'm computing the Complexity Index using TraMineR. Does it make sense to use the bootstrap procedure in order to obtain the confidence intervals for the Complexity Indexes? In this case, is there a ...
emanuela.struffolino's user avatar
4 votes
2 answers
239 views

TraMineR seqLLCS and seqdist reference sequence issue

When comparing the same string sequences in the example below, why does the first call return 0 instead of 7? LCS.ex1[3,] is "S-U-M-S-SC-UC-MC" and LCS.ex2[1,] is also "S-U-M-S-SC-UC-MC". Does one ...
Beth's user avatar
  • 41
4 votes
1 answer
333 views

Duration weighted Optimal Matching Algorithm using R

Besides the ado provided by Brendan Halpin for Stata, is there a way to pursue an Optimal Matching using the R-package TraMineR which weights OM’s elementary ...
non-numeric_argument's user avatar
4 votes
1 answer
334 views

How to interpret TraMineRs results of disstreedisplay and seqtreedisplay?

I am not quite sure what the differences are between the outputs and results of disstreedisplay and seqtreedisplay. Maybe you ...
non-numeric_argument's user avatar
4 votes
2 answers
1k views

Mining patterns in continuous sequence

I have data in form of $N$ sequences $s_j=(t_i, e_i)_{i\in\{1,\ldots,n_j\}}$ with $n_j$ data-points each, where $t_i$ is a time-stamp and $e_i$ is a categorial event, say $e_i\in\{A,B,C,D\}$. The $N$ ...
thias's user avatar
  • 965
3 votes
1 answer
393 views

Optimal matching distances as percentages?

I'm using R and the library TraMineR to do sequence analysis on social science data. I have computed an optimal matching (OM) distance matrix. ...
histelheim's user avatar
  • 3,023
3 votes
1 answer
346 views

How to do centroid clustering of sequences?

I want to cluster sequences using centroids. In the hclust package it is noted that "Method "centroid" is typically meant to be used with squared Euclidean ...
histelheim's user avatar
  • 3,023
3 votes
1 answer
617 views

Optimal matching distances

If I have two sequences: 1: A-B-C-D 1: X-A-B-C-D and I do: library(TraMineR) seqdist(sequence1, sequence2, method = "OM") ...
histelheim's user avatar
  • 3,023
3 votes
1 answer
179 views

Weightining using TraMineR

I have read some posts on weighting. However, I am still unclear on the sort of weights I need to use. I am using data from the Longitudinal Survey of Australian Youth (LSAY). This survey provides ...
fcorowe's user avatar
  • 31
3 votes
2 answers
215 views

Looking for distance metrics for trajectories of state sequences, based on nearness in time

I am working with data on individual trajectories, defined as a categorical state defined for each time period, using R's TraMineR package to visualize and calculate distances between each pair of ...
user12623's user avatar
3 votes
1 answer
396 views

TraMineR: predicting class membership of new sequences

Question summary This question pertains to analyzing dissimilarities between discrete state sequences (e.g., using TraMineR), more specifically to classifying new, ...
Maxim.K's user avatar
  • 560
3 votes
1 answer
1k views

Mean and Variance of a Set of Sequences

I am trying to find the probability distribution (like mean and variance) of a set of sequences which have different length. I came into different measurement models that quantify the distance between ...
POD's user avatar
  • 229
3 votes
1 answer
231 views

How to calculate turbulence and similarity index with TraMineR?

I am new to sequence analysis and wondering whether TraMineR can calculate Elzinga's turbulence and similarity index or I should learn to use his CHESA software to do this? I appreciate any thoughts ...
Seok-Woo Kwon's user avatar
3 votes
1 answer
509 views

Detecting outlier sequences in clusters

My question is a general one: I have sequences of categorical variables (click stream) that I analyzed using TraMineR. I now want to conduct cluster analysis (CA) using the WeightedCluster package. ...
user3315563's user avatar
3 votes
0 answers
425 views

data-transformation for multi-state analysis using traminer/mstate

I am trying to estimate a multi-state model and am following the setup in the book by Mills (2011). The research units can go through different states a, b, c, and d. The research units can move ...
Richard's user avatar
  • 135
2 votes
1 answer
654 views

How to do distance calculation and clustering for event sequences in TraMineR?

I've been using TraMineR for a while now, even though I consider myself a begginer user. The same goes for R language. Yet, I've been able to successfully perform a few optimal matching analysis. Now ...
Pedro Braz's user avatar
2 votes
1 answer
108 views

Why does the row order of the sequences in TraMineR influence clustering results (Wards method)?

We have a large sample (44,933 sequences each of potential length 35) with 9 states. We create a standard dissimilarity matrix: ...
Larry's user avatar
  • 21
2 votes
1 answer
92 views

Length-dependent indel costs in OMA algorithm?

I re-read this article after a long time (this time paying attention to the fine print) and noticed that they use indel costs that depend on sequence length in their OMA. They argue that it is done to ...
Kenji's user avatar
  • 858
2 votes
2 answers
103 views

How do I approach this problem about the order of the events?

So let's imagine I have a dataset of children. For each of them a have a bunch of characteristics (generation, gender, race, class, urban/rural, religion, bmi, number of siblings etc..) and plus the ...
ADayWithoutRain's user avatar
2 votes
1 answer
1k views

Aligning and clustering sequences of events

I have some data describing sequences of events. There are a number of different events (over 30), and the data records which event occurred in what order. There are no fixed number of events that ...
TJC's user avatar
  • 135
2 votes
1 answer
141 views

TraMineR - dont print message of seqdef

Is there a possibility to disable the initial message (1) when creating a sequence with seqdef library(TraMineR) ? (1) this ...
giac's user avatar
  • 911