Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How can I change the order display in multtrajplot?

    After running a multi-trajectory group model:
    . traj, multgroups(8) var1(days_MC*) indep1(t_1-t_5) order1(3 3 3 3 3 3 3 3) model1(zip) ///
    > var2(CPD_MCcat*) indep2(t_1-t_5) order2(3 3 3 3 3 3 3 3) model2(zip) ///
    > var3(days_fENDS*) indep3(t_1-t_5) order3(3 3 3 3 3 3 3 3) model3(zip) ///
    > var4(P30D_fHK_now*) indep4(t_1-t_5) order4(3 3 3 3 3 3 3 3) model4(zip) ///
    > var5(P30D_oFTP*) indep5(t_1-t_5) order5(3 3 3 3 3 3 3 3) model5(logit)

    I finalized an 8 group model and tried to plot it:
    multtrajplot, xtitle(Wave) ytitle1(days_MC) ytitle2(CPD_MC) ytitle3(days_fENDS) ytitle4(Current status_fHK) ytit
    > le5(P30D_fcigar/smkl) ylabel1(0(10)30) ylabel2(0(1)5) ylabel3(0(10)30) ylabel4(0(1)2) ylabel5(0 1)

    The display is fine, but I just want to change the order. For example, since Group 3 is the reference. I want to change the order to start with Group 3 (renamed Group 1). How is it possible? Thank you in advance.

    .
    Click image for larger version

Name:	Group8.jpg
Views:	1
Size:	79.3 KB
ID:	1704026


  • #2
    Both traj and multtrajplot are user-community contributed commands (something that you should mention when you post on the Statalist, see also FAQ 3. What should I do before I post? and FAQ 12.1 What to say about your commands and your problem) and can be installed using:
    Code:
    net from https://www.andrew.cmu.edu/user/bjones/traj
    net install traj
    h traj
    h trajplot
    h multtrajplot
    Furthermore, there are publications about the method with some examples using traj and multtrajplot:The authors' webpage is here ( Bobby L. Jones & Daniel S. Nagin).

    I suggest that you write them your question and, should you be able to change the order, post the solution here as a follow up message with an example that other Stata users can replicate.
    http://publicationslist.org/eric.melse

    Comment

    Working...
    X