dissvar-grp: Discrepancy by group.

Description Usage Arguments Details Value Note Author(s) See Also Examples

Description

This function computes the dissimilarity-based discrepancy measure of the groups defined by the group variable. The function is a wrapper for the TraMineR dissvar function.

Usage

1

Arguments

diss

a dissimilarity matrix or a dist object.

group

group variable. If NULL a single group is assumed.

...

additional arguments passed to dissvar .

Details

The function is a wrapper for running dissvar on the different groups defined by the group variable.

Value

A vector with the group discrepancy measures.

Note

This function is a pre-release and further testing is still needed, please report any problems.

Author(s)

Gilbert Ritschard

See Also

dissvar

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## create the biofam.seq state sequence object from the biofam data.
data(biofam)
biofam <- biofam[1:100,]
biofam.seq <- seqdef(biofam[,10:25])
dist <- seqdist(biofam.seq, method="HAM")

## discrepancy based on non-squared dissimilarities
dissvar.grp(dist, biofam$plingu02)
## square root of discrepancy based on squared dissimilarities
sqrt(dissvar.grp(dist, biofam$plingu02, squared=TRUE))

Example output

Loading required package: TraMineR

TraMineR stable version 2.0-7 (Built: "Sat,)
Website: http://traminer.unige.ch
Please type 'citation("TraMineR")' for citation information.

TraMineRextras stable version 0.4.1 (Built: 2017-09-21)
Functions provided by this package are still in test
    and subject to changes in future releases.
 [>] 6 distinct states appear in the data: 
     1 = 0
     2 = 1
     3 = 2
     4 = 3
     5 = 6
     6 = 7
 [>] state coding:
       [alphabet]  [label]  [long label] 
     1  0           0        0
     2  1           1        1
     3  2           2        2
     4  3           3        3
     5  6           6        6
     6  7           7        7
 [>] 100 sequences in the data set
 [>] min/max sequence length: 16/16
 [>] 100 sequences with 6 distinct states
 [>] creating a 'sm' with a single substitution cost of 1
 [>] creating 6x6 substitution-cost matrix using 1 as constant value
 [>] 72 distinct sequences
 [>] min/max sequence length: 16/16
 [>] computing distances using the HAM metric
 [>] elapsed time: 0.015 secs
  french   german  italian 
3.570637 4.269025 3.125000 
  french   german  italian 
5.452642 6.569644 5.545268 

TraMineRextras documentation built on Feb. 1, 2018, 5:03 p.m.