[Traminer-users] Problem creating a sequence object from spell to sts
Gilbert Ritschard
Gilbert.Ritschard at unige.ch
Fri Jun 8 09:57:06 CEST 2012
Hi Anton,
The summaries that your report are NOT those of your begin and end
variables. Seems you are computed ages from year data and use the ages
as begin and end variable. The solution consist in just adding 1 to the
P_AGEDEB and P_AGEFIN variables. Then it is just a matter of
interpretation: the resulting ages should be seen as ages at the and of
the period.
Hope this helps.
Gilbert
On 07-Jun-12 16:40, Anton Perdoncin wrote:
> Hello,
>
> This might be a stupid question, but an error message pops up in the
> console when I try to create a sequence object :
> Erreur : [!] found one or more spell with starting time< 1
>
> Here is the code:
> LA.sts <- seqformat(trajpro, id="IDENT", begin="P_AGDEB",
> end="P_AGFIN", status="traj.cs", from="SPELL", to="STS", process=FALSE)
>
> And the summary of the begin and end variables;
> summary(trajpro$P_ANDEB)
> Min. 1st Qu. Median Mean 3rd Qu. Max.
> 1948 1976 1989 1987 2000 2009
> > summary(trajpro$P_ANFIN)
> Min. 1st Qu. Median Mean 3rd Qu. Max.
> 1948 1992 2003 1999 2008 2009
>
>
> It seems that there is no missing value.
>
> The dataset is Ined Trajectoires et Origines (TeO). I suspect that the problem comes from the way trajectories where coded: when one individual spends less than one year in a particular state, begin and end years are the same. So spell=0...
>
> Am I right? Does it imply that I have to recode the whole dataset?
>
> Thanks in advance for your help.
>
> Regards,
>
> Anton Perdoncin
>
>
>
>
> _______________________________________________
> Traminer-users mailing list
> Traminer-users at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/traminer-users
More information about the Traminer-users
mailing list