<p style="margin:0;padding:0;" align="left"><br /></p> Bonjour, <br /><br />  J'ai réalisé une classification hiérarchique à partir de la matrice de distance calculée par la méthode de l'Optimal Matching<br />(avec le package Traminer). Je dispose donc de 1312  séquences réparties en 7 classes. Je souhaiterais récupérer une table dans laquelle chaque séquence est associée à sa classe et ainsi pouvoir réaliser des statistiques par classe. En revanche, je préferais produire ces statistiques sur SAS et non sur R. Sauriez vous comment d'une part récupérer une table R dans laquelle je pourrais savoir quelle séquence est dans quelle classe? D'autre part, serait-il possible de l'exporter sous SAS?<br /><br /> Je vous remercie par avance.<br />Sonia<br /> <br /> <br /><br /><blockquote style="padding-left: 5px; margin-left: 5px; border-left: 2px solid #ff0000">> Message du 03/04/12 22:14<br />> De : "Hadrien Commenges" <br />> A : "Users questions" <br />> Copie à : traminer-users@r-forge.wu-wien.ac.at<br />> Objet : Re: [Traminer-users]  création d'une séquence à partir d'un format SPELL<br />><br />> <style>p { margin: 0; }</style><p style="font-family: Arial,Helvetica,sans-serif; font-size: 12pt; color: #000000">Hi,<br />> <br />> waiting for an answer from the package's managers or from other users, I can give you some leads. First you should try with another format for your status variable (currently it's a factor), character or numeric vector. If it doesn't work you should try with the seqformat function (from="SPELL", to="STS"). If it doesn't work and if there is no better option from other users I can give you a script I made to convert SPELL format into STS format (I wrote it because I needed to deal with specific problems with my data).<br />> <br />> Hadrien<br />> <br />> <hr /><p style="color: #000000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt"><strong>De: </strong>"Guillaume Ollivier" <br />> <strong>À: </strong>traminer-users@r-forge.wu-wien.ac.at<br />> <strong>Envoyé: </strong>Mardi 3 Avril 2012 19:00:30<br />> <strong>Objet: </strong>[Traminer-users] création d'une séquence à partir d'un format SPELL<br />> <br />> <style><!-- /* Font Definitions */ @font-face  {font-family:Calibri;   panose-1:2 15 5 2 2 2 4 3 2 4;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal        {margin:0cm;    margin-bottom:.0001pt;  font-size:11.0pt;       font-family:"Calibri","sans-serif";         mso-fareast-language:EN-US;} a:link, span.MsoHyperlink  {mso-style-priority:99;         color:blue;     text-decoration:underline;} a:visited, span.MsoHyperlinkFollowed        {mso-style-priority:99;         color:purple;   text-decoration:underline;} span.EmailStyle17   {mso-style-type:personal-compose;       font-family:"Calibri","sans-serif";         color:windowtext;} .MsoChpDefault       {mso-style-type:export-only;    font-family:"Calibri","sans-serif";         mso-fareast-language:EN-US;} @page WordSection1         {size:612.0pt 792.0pt;  margin:70.85pt 70.85pt 70.85pt 70.85pt;} div.WordSection1       {page:WordSection1;} --></style><!--[if gte mso 9]><noxml> <o:shapedefaults v:ext="edit" spidmax="1026" /> </xml><![endif]--><!--[if gte mso 9]><noxml> <o:shapelayout v:ext="edit"> <o:idmap v:ext="edit" data="1" /> </o:shapelayout></xml><![endif]--><p style="margin:0;padding:0;" class="WordSection1"><p class="MsoNormal">Bonjour,</p><p class="MsoNormal"> </p><p class="MsoNormal">Je cherche à créer un seq à partir de données de CV formatées en SPELL. </p><p class="MsoNormal"><span>str(cv) :</span></p><p class="MsoNormal"><span>'data.frame':   444 obs. of  12 variables:</span></p><p class="MsoNormal"><span> $ idcv          : num  8.04e+13 8.04e+13 8.04e+13 8.04e+13 8.04e+13 ...</span></p><p class="MsoNormal"><span> $ start         : int  1989 1993 1994 1994 1995 1996 1997 1997 1998 1999 ...</span></p><p class="MsoNormal"><span> $ end           : int  1994 1994 1994 1997 1997 1996 1999 1999 2004 2009 ...</span></p><p class="MsoNormal"><span> $ status        : Factor w/ 7 levels "","academy","company",..: 1 1 1 1 7 7 1 1 2 1 ...</span></p><p class="MsoNormal"><span> $ nome_completo : Factor w/ 49 levels "Adriano Arriel Saquet",..: 30 30 30 30 30 30 30 30 30 30 ...</span></p><p class="MsoNormal"><span> $ ano_nascimento: int  1972 1972 1972 1972 1972 1972 1972 1972 1972 1972 ...</span></p><p class="MsoNormal"><span> $ sexo          : Factor w/ 2 levels "Feminino","Masculino": 2 2 2 2 2 2 2 2 2 2 ...</span></p><p class="MsoNormal"><span> $ etat          : Factor w/ 17 levels "","AC","AM","BA",..: 16 16 16 16 16 16 16 16 16 16 ...</span></p><p class="MsoNormal"><span> $ pais          : Factor w/ 2 levels "","Brasil": 2 2 2 2 2 2 2 2 2 2 ...</span></p><p class="MsoNormal"><span> </span>$ duree_parcours: num  23 23 23 23 23 23 23 23 23 23 ...</p><p class="MsoNormal"> $ ano_mini      : num  1989 1989 1989 1989 1989 ...</p><p class="MsoNormal"> $ denschaves    : num  0.564 0.564 0.564 0.564 0.564 ...</p><p class="MsoNormal">----------------</p><p class="MsoNormal"> </p><p class="MsoNormal">Pour cela j’utilise la fonction seqdef où je spécifie la localisation de la variable status dans lequel il y a des données manquantes:</p><p class="MsoNormal"><span>cv.seq <- seqdef(cv, var=c("idcv", "start", "end", "status"), informat="SPELL", id = "idcv", begin = "start", end = "end")</span></p><p class="MsoNormal"><span> </span></p><p class="MsoNormal"><span> </span></p><p class="MsoNormal">mais R me renvoie le message suivant :</p><p class="MsoNormal"><span>[>] SPELL data converted into 49 STS sequences</span></p><p class="MsoNormal"><span> [>] found missing values ('NA') in sequence data</span></p><p class="MsoNormal"><span> [>] preparing 49 sequences</span></p><p class="MsoNormal"><span> [>] coding void elements with '%' and missing values with '*'</span></p><p class="MsoNormal"><span> [!] sequence with index: 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49 contains only missing values.</span></p><p class="MsoNormal"><span>     This may produce inconsistent results.</span></p><p class="MsoNormal"><span> [>] 0 distinct states appear in the data: </span></p><p class="MsoNormal"><span>     1 = NA</span></p><p class="MsoNormal"><span>     0 = </span></p><p class="MsoNormal"><span> [>] alphabet (state labels): </span></p><p class="MsoNormal"><span>     1 = NA (NA)</span></p><p class="MsoNormal"><span>     0 =  ()</span></p><p class="MsoNormal"><span> [>] 49 sequences in the data set</span></p><p class="MsoNormal"><span> </span>[>] min/max sequence length: 100/100</p><p class="MsoNormal">-------------</p><p class="MsoNormal"> </p><p class="MsoNormal">Il semble que l’opération de conversion bloque  ce que confirme l’examen de l’objet cv.seq  qui ne contient que des données manquantes. R ne reconnait visiblement pas la variable status et les différents états qu’elle est censée contenir.</p><p class="MsoNormal">Pourriez-vous me donner des pistes pour solutionner ce problème</p><p class="MsoNormal"> </p><p class="MsoNormal">Bien cordialement</p><p class="MsoNormal"> </p><p class="MsoNormal">Guillaume Ollivier</p><p class="MsoNormal">INRA</p><p class="MsoNormal">Plateformes AMAnDeS.Txt</p><p class="MsoNormal">"Appui Méthodologique en Analyse des Données Sociologiques et Textuelles"</p><p class="MsoNormal">UR 0767 Ecodéveloppement</p><p class="MsoNormal">Agroparc, 84914 Avignon cedex 9</p><p class="MsoNormal">tel : 0432722579</p><p class="MsoNormal"><span><a href="http://www4.paca.inra.fr/ecodeveloppement/Plateforme-Amandes.txt" target="_blank"><span style="color: blue">http://www4.paca.inra.fr/ecodeveloppement/Plateforme-Amandes.txt</span></a></span></p><p class="MsoNormal"> </p></p><br />> _______________________________________________<br />> Traminer-users mailing list<br />> Traminer-users@lists.r-forge.r-project.org<br />> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/traminer-users</p><br />> </p>><br />> [ (pas de nom de fichier) (0.2 Ko) ]</blockquote>