From karvidegain at hotmail.com Mon Aug 13 22:51:38 2018 From: karvidegain at hotmail.com (Karina Videgain) Date: Mon, 13 Aug 2018 20:51:38 +0000 Subject: [Traminer-users] seqmtplot() In-Reply-To: References: Message-ID: I want to plot the mean time as distribution of the average number of years in each state by patways group (cluster) in the same graph/image. I can't find the way to do it with seqmeant. I'm trying with barplot but the output is not good enough. example: table1 <- seqmeant(seq[data$cluster==1, ], weighted=FALSE, prop=FALSE, serr=FALSE) table2 <- seqmeant(seq[data$cluster==2, ], weighted=FALSE, prop=FALSE, serr=FALSE) par(mfrow = c(1,2)) barplot(prop.table(table1),2) barplot(prop.table(table2),2) [cid:c3d091eb-95cb-456f-90c7-a25815cc13dd] Do you have any suggestion? I would like to get a bar with ylim=c(0,100) for each pathways in the same plot. Thanks! Karina Videgain Profesora-Investigadora Programa Universitario de Estudios del Desarrollo (PUED) Universidad Nacional Aut?noma de M?xico (UNAM) Tel: (52 55) 5622 1888 Ext. 82615 ________________________________ De: traminer-users-bounces at lists.r-forge.r-project.org en nombre de Karina Videgain Enviado: jueves, 18 de febrero de 2016 8:52 Para: traminer-users at lists.r-forge.r-project.org Asunto: [Traminer-users] multichannel and aggregate cases I am working with a big data frame and you recommended me to use weightCluster and aggregate cases. It worked very well for me but now I want to use Multichannel Sequence Analysis and I don't find the way to use aggregate cases for the three dimensions (channels) that I am using. ?Is it possible to aggregate cases for the three sequence object? Thanks Karina -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pastedImage.png Type: image/png Size: 2770 bytes Desc: pastedImage.png URL: From Gilbert.Ritschard at unige.ch Tue Aug 14 17:47:33 2018 From: Gilbert.Ritschard at unige.ch (Gilbert Ritschard) Date: Tue, 14 Aug 2018 15:47:33 +0000 Subject: [Traminer-users] seqmtplot() Message-ID: <72222d85413e4b1ba1f6bc541cb44391@unige.ch> I would like to encourage all TraMineR users to ask their questions on stackexchange: StackOverflow (SO) for R-code related questions and CrossValidated (CV) for questions regarding statistical interpretation and methodological issues. (See http://traminer.unige.ch/contrib.shtml ). You will reach there a much wider audience and thus increase chances to get good answers. This is in particular true for the question asked here, which is more a basic R question than a TraMineR-related one. (The question could have been posted on SO with the 'r' and 'traminer' tags). Anyway, the solution is simply: pmeant <- prop.table(cbind(table1,table2),2) barplot(100*pmeant) Best. Gilbert From: Traminer-users On Behalf Of Karina Videgain Sent: lundi 13 ao?t 2018 22:52 I want to plot the mean time as distribution of the average number of years in each state by patways group (cluster) in the same graph/image. I can't find the way to do it with seqmeant. I'm trying with barplot but the output is not good enough. example: table1 <- seqmeant(seq[data$cluster==1, ], weighted=FALSE, prop=FALSE, serr=FALSE) table2 <- seqmeant(seq[data$cluster==2, ], weighted=FALSE, prop=FALSE, serr=FALSE) par(mfrow = c(1,2)) barplot(prop.table(table1),2) barplot(prop.table(table2),2) Do you have any suggestion? I would like to get a bar with ylim=c(0,100) for each pathways in the same plot.