TraMineR (version 2.2-0.1)

seqprecstart: State precarity

Description

Determines the initial state precarity degree from the state ordering. (See details.)

Usage

seqprecstart(seqdata, state.order=alphabet(seqdata, with.missing), state.equiv=NULL, 
    stprec=NULL, with.missing=FALSE)

Arguments

seqdata

a state sequence object (class stslist) as returned by the seqdef function.

state.order

Vector of short state labels defining the order of the states. First the less precarious (most positive) state and then the other states in increasing precariousness order. States of the alphabet that are not included here define the non-comparable states.

state.equiv

List of state equivalence classes. The classes in the list are each set as the vector of the short labels of the states forming the class.

stprec

Vector of user defined state precarity degrees ordered conformably with the alphabet of seqdata.

with.missing

Logical. Should the missing state be considered as an element of the alphabet?

Value

The vector of assigned precarity degrees sorted according to the original order of states in the alphabet.

Details

When stprec=NULL, the initial state precarity degrees are set as equivalently spaced values between 0 and 1 assigned to the states in the specified order.

Equivalent states get the mean value of the states in the equivalence class.

Incomparable states (those not on the state.order list and not member of an equivalent class having a state listed in state.order) receive the average of all state precarity degrees.

When stprec is user defined, the provided vector is normalized by its maximal value and mean value of states in a class are assigned to all class members.

Only one state per class needs to be on the state order list. If more than one member is on the state order list they should be listed consecutively. Note that currently no check is performed.

When with.missing=TRUE, use the seqdata, "nr" argument to possibly include it in the state.order or state.equiv.

References

Ritschard, G., Bussi, M., and O'Reilly, J. (2018), "An index of precarity for measuring early employment insecurity", in G. Ritschard, and M. Studer, Sequence Analysis and Related Approaches: Innovative Methods and Applications, Series Life Course Research and Social Policies, Vol. 10, pp 279-295. Cham: Springer.

See Also

seqprecarity.

Examples

Run this code
# NOT RUN {
## Defining a sequence object with columns 13 to 24
## in the 'actcal' example data set
data(actcal)
actcal <- actcal[1:200,] ## Here, only a subset
actcal.seq <- seqdef(actcal[,13:24])

## state precarity levels using the original state order
seqprecstart(actcal.seq)

## Assuming A and B as equivalent regarding precarity
seqprecstart(actcal.seq, state.equiv=list(c('A','B')))

## and letting C be non-comparable
seqprecstart(actcal.seq, state.order=c("A","B","D"), state.equiv=list(c('A','B')))

# }

Run the code above in your browser using DataCamp Workspace