[Traminer-users] creating multicharacter state sequence objects &weights

Kamerade Daiga D.Kamerade at salford.ac.uk
Mon Feb 13 15:52:11 CET 2012


Dear Matthias,
Thank you very much for your detailed and very useful response! Much appreciated.
Best wishes
Daiga


_____________________________________________________________________
Daiga Kamerade, Ph.D. (Cantab), PGCE HEPR, FHEA
Lecturer in Organisational Behaviour and HRM, Salford Business School
VC Early Career Research Scholar
Room 327, Maxwell Building, University of Salford, Salford, Manchester, M5 4WT, UK
Tel. ++ 44 (0)161 295  5318
Research profile:http://www.seek.salford.ac.uk/profiles/DAIGA%20KAMERADE.jsp

[SBS logo 70]<http://www.business.salford.ac.uk/>
DISCLAIMER: This e-mail is confidential and privileged.
If you are not an intended recipient please accept my apologies.
Please do not disclose, copy or distribute information in this e-mail without my permission.

From: traminer-users-bounces at r-forge.wu-wien.ac.at [mailto:traminer-users-bounces at r-forge.wu-wien.ac.at] On Behalf Of Matthias Studer
Sent: 13 February 2012 10:10
To: Users questions
Subject: Re: [Traminer-users] creating multicharacter state sequence objects &weights

Dear Daïga,

Here are some answers to your questions.

1) The function "interaction" from the "base" library can be used to create a new variable. For instance, to create a new variable called "state1", you may use the following code:

mydata$state1 <- interaction(mydata$A1, mydata$B1, mydata$C1, mydata$D1, mydata$E1)

Doing it for each of the five time t, you can get your sequence data. For more information on the "interaction" function, you may run:

help(interaction)

2) sampling weights can be used with the weights argument of the seqdef function (see help(seqdef)). By default, weights will be used in all subsequent call to the different seq type functions. More information on this are given in the reference below (see section 4)

Gabadinho, A., Ritschard, G., Müller, N.S. & Studer, M. (2011), Analyzing and visualizing state sequences in R with TraMineR, Journal of Statistical Software. Vol. 40(4), pp. 1-37.

Hope this helps

Matthias Studer


Le 09.02.2012 09:40, Kamerade Daiga a écrit :
Dear All,

firstly, hello to everyone- I am new to this list lured here by analytical opportunities offered by TraMineR which are excellently presented in the User Guide! I am using TraMineR to analyse membership histories in voluntary sector organisations.

Two questions:

1) Could anyone, please, help me to figure out how can I create multi-character state sequence objects. Currently I have five variables A, B, C,D,E measured five times, each having two levels: yes (1) &no (0), so the data frame contains 25 colums with states: A1,B1, C1, D1, E1, A2, B2, C2, D2, E2, A3....etc E5. I want to create sequences where each state is represented by all five variables at time point t., e.g. something like this: 01111-10000-11111, i.e at time t this persona was not in A but was in BCDE; at time t+1 he was in A but not in other etc.
2) how can sampling weights be incorporated into different seq type functions?

thank you very much in advance!

best wishes
Daiga



_____________________________________________________________________
Daiga Kamerade, Ph.D. (Cantab), PGCE HEPR, FHEA
Lecturer in Organisational Behaviour and HRM, Salford Business School
VC Early Career Research Scholar
Room 327, Maxwell Building, University of Salford, Salford, Manchester, M5 4WT, UK
Tel. + 44 (0)161 295 5318
Research profile:http://www.seek.salford.ac.uk/profiles/DAIGA%20KAMERADE.jsp






_______________________________________________

Traminer-users mailing list

Traminer-users at lists.r-forge.r-project.org<mailto:Traminer-users at lists.r-forge.r-project.org>

https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/traminer-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/traminer-users/attachments/20120213/ff27c235/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 40018 bytes
Desc: image001.png
URL: <http://lists.r-forge.r-project.org/pipermail/traminer-users/attachments/20120213/ff27c235/attachment-0001.png>


More information about the Traminer-users mailing list