BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
rwollast
Fluorite | Level 6

Hi everyone,

 

I was using SAS on a virtual laboratory from my university to conduct a group-based trajectory analysis. I have now downloaded SAS on my computer (SAS 9.4 TS1 M7.x64) as well as the traj macro from here: https://www.andrew.cmu.edu/user/bjones/download.htm

 

In sum, when I run the same syntax as I did on the virtual machine, everything works. I can get the trajectory graphs, the detailed requested output tables (OP, OF, OS, OE). However, I cannot have the visual output that it is extremely useful when you need to compare several concurrent models and identify quickly the significant trajectory shapes (see below the output that is missing from my SAS version on my computer).

rwollast_0-1655052730114.png

 

PROC TRAJ OUTPLOT=OP OUTSTAT=OS OUT=OF OUTEST=OE ITDETAIL;
ID id; VAR AUT1-AUT9; INDEP T1-T9;
MODEL CNORM; MIN 1; MAX 10; NGROUPS 2; ORDER 3 3;
RUN;
%TRAJPLOTNEW(OP,OS)

 

Best,


Robin

1 ACCEPTED SOLUTION

Accepted Solutions
rwollast
Fluorite | Level 6

Hi everyone,

 

One of my colleagues found a solution: Instead of running SAS Studio 3.81, I ran SAS 9.4 (English with DBCS). Using the same syntax, I was able to generate all the important outputs. 

 

Best,


Robin

View solution in original post

6 REPLIES 6
SASKiwi
PROC Star

I've never used PROC TRAJ, but it is possible that you don't have the right ODS settings for the report to be displayed. Try adding the statement ODS LISTING; at the beginning of your program and then rerun it.

rwollast
Fluorite | Level 6

Thank you very much for your answer. I'm not familiar with the software so I'm not totally sure I understand your suggestion.

 

First, I typed the "ODS settings;" command in my syntax and I got this message which basically says that ODS statements in the SAS Studio environment may disable some output features.

Sans titre.png

 

Could you please be more specific and state where I should add this command or where can I access those options.

 

Best,


Robin

SASKiwi
PROC Star

Like this:

ods listing;

PROC TRAJ OUTPLOT=OP OUTSTAT=OS OUT=OF OUTEST=OE ITDETAIL;
ID id; VAR AUT1-AUT9; INDEP T1-T9;
MODEL CNORM; MIN 1; MAX 10; NGROUPS 2; ORDER 3 3;
RUN;
%TRAJPLOTNEW(OP,OS)
rwollast
Fluorite | Level 6

As suggested, I included the ods listing command on my new syntax: 

rwollast_3-1655088550952.png

When I run it, I obtain the exact same results including the graph: 

rwollast_4-1655088575196.png

As well as all the tables that I can export (OS, OP, OF, OE):

rwollast_5-1655088623325.png

 

This means that the syntax is correct and SAS can successfully calculated my trajectories. However, there is still no sign of the direct output as I mentioned in my first email. 

 

In sum, I feel like using the ods listing; command did not change anything. 

 

Here is the message I receive from SAS: 

 

1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
NOTE: les instructions ODS dans l'environnement SAS Studio risquent de désactiver certaines fonctionnalités de sortie.
73
74 ods listing;
75
76 PROC TRAJ OUTPLOT=OP OUTSTAT=OS OUT=OF OUTEST=OE ITDETAIL;
77 ID id; VAR EMOD1-EMOD5; INDEP T1-T5;
78 MODEL CNORM; MIN 1; MAX 5; NGROUPS 4; ORDER 1 2 3 3;
79 RUN;
 
*** SAS PROC TRAJ *** Jones BL Nagin DS, Version Date: Oct 15 2020
 
NOTE: 6026 observations read.
 
NOTE: 223 had no trajectory data.
NOTE: 5803 observations used in trajectory model.
 
 
Start:
 
Parameter estimates
 
1.383890 0.000000 2.100791 0.000000 0.000000 2.817693
0.000000 0.000000 0.000000 3.534595 0.000000 0.000000
0.000000 0.896127 25.000000 25.000000 25.000000 25.000000
0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
 
 
Iteration Details
 
Iteration Neg. Log Percent
Number Likelihood Decrease
 
0 15869.7506445
1 15857.5212875 0.07706080
2 15844.6038990 0.08145906
3 15825.1875017 0.12254265
4 15809.6221606 0.09835802
5 15784.9729784 0.15591253
6 15763.8928355 0.13354564
7 15737.5029142 0.16740739
8 15655.4656016 0.52128545
9 15545.3616093 0.70329427
10 15449.6077188 0.61596438
11 15343.6029118 0.68613268
12 15329.3671894 0.09277953
13 15312.2954330 0.11136635
14 15288.0965699 0.15803550
15 15145.8743217 0.93028094
16 15051.5374676 0.62285512
17 14979.9006581 0.47594347
18 14953.0576342 0.17919360
19 14855.0641609 0.65534071
20 14838.6338825 0.11060389
21 14804.4112623 0.23063188
22 14784.8164994 0.13235760
23 14687.6194958 0.65741096
24 14684.5091599 0.02117658
25 14684.4023412 0.00072742
26 14683.5618744 0.00572353
27 14683.2549303 0.00209039
28 14682.8128570 0.00301073
29 14639.6275721 0.29412133
30 14639.0584091 0.00388782
31 14638.7522745 0.00209122
32 14638.3279889 0.00289837
33 14637.8931452 0.00297058
34 14637.2366160 0.00448513
35 14615.7858991 0.14654895
36 14615.0935780 0.00473680
37 14615.0381359 0.00037935
38 14614.8081791 0.00157343
39 14614.6881390 0.00082136
40 14576.7669433 0.25947318
41 14571.5311470 0.03591878
42 14559.1373777 0.08505468
43 14532.0505943 0.18604662
44 14520.0165716 0.08281022
45 14518.1643123 0.01275659
46 14517.6069100 0.00383934
47 14516.7759292 0.00572395
48 14516.2881091 0.00336039
49 14515.5955012 0.00477125
50 14510.3984370 0.03580331
51 14506.9697422 0.02362923
52 14501.1705584 0.03997516
53 14490.9249410 0.07065373
54 14487.9786874 0.02033172
55 14487.6664633 0.00215506
56 14487.6586596 0.00005386
57 14487.3894295 0.00185834
58 14487.2136866 0.00121308
59 14487.0117357 0.00139399
60 14486.8724441 0.00096149
61 14486.6829359 0.00130814
62 14483.9399513 0.01893453
63 14478.8491748 0.03514773
64 14474.1422263 0.03250913
65 14474.0267786 0.00079761
66 14470.0160293 0.02770998
67 14469.1836884 0.00575218
68 14467.5312767 0.01142021
69 14466.2624730 0.00877001
70 14466.1625208 0.00069093
71 14466.0995481 0.00043531
72 14466.0552956 0.00030591
73 14466.0069090 0.00033448
74 14465.9575150 0.00034145
75 14465.8960586 0.00042483
76 14465.8097957 0.00059632
77 14463.9413470 0.01291631
78 14462.0799244 0.01286940
79 14460.4094585 0.01155066
80 14458.6571338 0.01211808
81 14457.7630452 0.00618376
82 14457.4393493 0.00223891
83 14456.6416492 0.00551758
84 14456.3714806 0.00186882
85 14454.5438064 0.01264269
86 14454.4430804 0.00069685
87 14454.4091212 0.00023494
88 14454.3744041 0.00024018
89 14454.3520563 0.00015461
90 14454.3220515 0.00020758
91 14453.7334237 0.00407233
92 14452.6665227 0.00738149
93 14451.7082319 0.00663055
94 14451.3636825 0.00238414
95 14451.1072575 0.00177440
96 14450.9791492 0.00088649
97 14450.7987591 0.00124829
98 14450.7461835 0.00036382
99 14450.7404741 0.00003951
100 14450.7122659 0.00019520
101 14450.7012321 0.00007635
102 14450.6976521 0.00002477
103 14450.6933763 0.00002959
104 14450.6926067 0.00000533
105 14450.6925563 0.00000035
106 14450.6925303 0.00000018
107 14450.6925196 0.00000007
108 14450.6925174 0.00000002
109 14450.6925173 0.00000000
 
 
Parameter estimates for adding risk factors
 
0.896480 0.032059 1.957217 0.039198 -0.004190 2.878760
0.039044 0.003359 -0.001658 4.794421 -0.866485 0.284051
-0.028402 0.554953 1.550513 1.330953 -0.066046 0.000000
 
 
Parameter estimates
 
0.896480 0.032059 1.957217 0.039198 -0.004190 2.878760
0.039044 0.003359 -0.001658 4.794421 -0.866485 0.284051
-0.028402 0.554953 9.583478 45.175449 36.270095 8.970979
0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
 
NOTE: There were 6026 observations read from the data set WORK.IMPORT.
NOTE: The data set WORK.OP has 5 observations and 17 variables.
NOTE: The data set WORK.OS has 4 observations and 7 variables.
NOTE: The data set WORK.OF has 6026 observations and 16 variables.
NOTE: The data set WORK.OE has 19 observations and 26 variables.
NOTE: The data set WORK.SSCPTTZ has 20 observations and 21 variables.
NOTE: The PROCEDURE TRAJ printed page 1.
NOTE: PROCEDURE TRAJ a utilisé (Durée totale du traitement) :
real time 2.31 seconds
cpu time 2.32 seconds
 
 
80 %TRAJPLOTNEW(OP,OS)
NOTE: No units specified for the HTITLE option. The current units associated with GUNIT will be used.
NOTE: No units specified for the HTEXT option. The current units associated with GUNIT will be used.
 
NOTE: The data set WORK.CPREDTMP has 17 observations and 1 variables.
NOTE: PROCEDURE CONTENTS a utilisé (Durée totale du traitement) :
real time 0.00 seconds
cpu time 0.00 seconds
 
 
 
NOTE: There were 17 observations read from the data set WORK.CPREDTMP.
NOTE: DATA statement a utilisé (Durée totale du traitement) :
real time 0.00 seconds
cpu time 0.00 seconds
 
 
 
NOTE: Deleting WORK.CPREDTMP (memtype=DATA).
 
NOTE: PROCEDURE DATASETS a utilisé (Durée totale du traitement) :
real time 0.00 seconds
cpu time 0.00 seconds
 
 
 
NOTE: There were 4 observations read from the data set WORK.OS.
NOTE: DATA statement a utilisé (Durée totale du traitement) :
real time 0.00 seconds
cpu time 0.00 seconds
 
 
 
WARNING: There is not enough room to use the specified ACROSS=4. It was only possible to fit 3 legend entries across. The
default will be used.
 
NOTE: There were 5 observations read from the data set WORK.OP.
NOTE: PROCEDURE GPLOT a utilisé (Durée totale du traitement) :
real time 0.65 seconds
cpu time 0.28 seconds
 
 
81
82 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
rwollast
Fluorite | Level 6

Hi,

 

I followed your suggestion by adding the ods listing command: 

rwollast_3-1655088550952.png

However, doing so did not change anything and gave me the exact same results as I had without this command. 

Specifically, the graph as well as the requested tables (OF, OP, OE, OS):

rwollast_4-1655088575196.png

rwollast_5-1655088623325.png

 

This suggests that SAS correctly calculated by trajectories. However, one output is still missing which provides the p-values, etc (and which is available in virtual lab from my university). 

 

Below is the message SAS sent me after I ran the syntax above.

 

 1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;

 NOTE: les instructions ODS dans l'environnement SAS Studio risquent de désactiver certaines fonctionnalités de sortie.

 73        

 74         ods listing;

 75        

 76         PROC TRAJ OUTPLOT=OP OUTSTAT=OS OUT=OF OUTEST=OE ITDETAIL;

 77             ID id; VAR EMOD1-EMOD5; INDEP T1-T5;

 78             MODEL CNORM; MIN 1; MAX 5; NGROUPS 4; ORDER 1 2 3 3;

 79         RUN;

 

  *** SAS PROC TRAJ ***  Jones BL  Nagin DS,  Version Date: Oct 15 2020

 

 NOTE:  6026 observations read.

 

 NOTE:  223 had no trajectory data.

 NOTE:  5803 observations used in trajectory model.

 

   Start:

 

  Parameter estimates

 

     1.383890     0.000000     2.100791     0.000000     0.000000     2.817693

     0.000000     0.000000     0.000000     3.534595     0.000000     0.000000

     0.000000     0.896127    25.000000    25.000000    25.000000    25.000000

     0.000000     0.000000     0.000000     0.000000     0.000000     0.000000

  

  Iteration Details

 

  Iteration   Neg. Log          Percent

  Number      Likelihood        Decrease

 

       0     15869.7506445

       1     15857.5212875      0.07706080

       2     15844.6038990      0.08145906

       3     15825.1875017      0.12254265

       4     15809.6221606      0.09835802

       5     15784.9729784      0.15591253

       6     15763.8928355      0.13354564

       7     15737.5029142      0.16740739

       8     15655.4656016      0.52128545

       9     15545.3616093      0.70329427

      10     15449.6077188      0.61596438

      11     15343.6029118      0.68613268

      12     15329.3671894      0.09277953

      13     15312.2954330      0.11136635

      14     15288.0965699      0.15803550

      15     15145.8743217      0.93028094

      16     15051.5374676      0.62285512

      17     14979.9006581      0.47594347

      18     14953.0576342      0.17919360

      19     14855.0641609      0.65534071

      20     14838.6338825      0.11060389

      21     14804.4112623      0.23063188

      22     14784.8164994      0.13235760

      23     14687.6194958      0.65741096

      24     14684.5091599      0.02117658

      25     14684.4023412      0.00072742

      26     14683.5618744      0.00572353

      27     14683.2549303      0.00209039

      28     14682.8128570      0.00301073

      29     14639.6275721      0.29412133

      30     14639.0584091      0.00388782

      31     14638.7522745      0.00209122

      32     14638.3279889      0.00289837

      33     14637.8931452      0.00297058

      34     14637.2366160      0.00448513

      35     14615.7858991      0.14654895

      36     14615.0935780      0.00473680

      37     14615.0381359      0.00037935

      38     14614.8081791      0.00157343

      39     14614.6881390      0.00082136

      40     14576.7669433      0.25947318

      41     14571.5311470      0.03591878

      42     14559.1373777      0.08505468

      43     14532.0505943      0.18604662

      44     14520.0165716      0.08281022

      45     14518.1643123      0.01275659

      46     14517.6069100      0.00383934

      47     14516.7759292      0.00572395

      48     14516.2881091      0.00336039

      49     14515.5955012      0.00477125

      50     14510.3984370      0.03580331

      51     14506.9697422      0.02362923

      52     14501.1705584      0.03997516

      53     14490.9249410      0.07065373

      54     14487.9786874      0.02033172

      55     14487.6664633      0.00215506

      56     14487.6586596      0.00005386

      57     14487.3894295      0.00185834

      58     14487.2136866      0.00121308

      59     14487.0117357      0.00139399

      60     14486.8724441      0.00096149

      61     14486.6829359      0.00130814

      62     14483.9399513      0.01893453

      63     14478.8491748      0.03514773

      64     14474.1422263      0.03250913

      65     14474.0267786      0.00079761

      66     14470.0160293      0.02770998

      67     14469.1836884      0.00575218

      68     14467.5312767      0.01142021

      69     14466.2624730      0.00877001

      70     14466.1625208      0.00069093

      71     14466.0995481      0.00043531

      72     14466.0552956      0.00030591

      73     14466.0069090      0.00033448

      74     14465.9575150      0.00034145

      75     14465.8960586      0.00042483

      76     14465.8097957      0.00059632

      77     14463.9413470      0.01291631

      78     14462.0799244      0.01286940

      79     14460.4094585      0.01155066

      80     14458.6571338      0.01211808

      81     14457.7630452      0.00618376

      82     14457.4393493      0.00223891

      83     14456.6416492      0.00551758

      84     14456.3714806      0.00186882

      85     14454.5438064      0.01264269

      86     14454.4430804      0.00069685

      87     14454.4091212      0.00023494

      88     14454.3744041      0.00024018

      89     14454.3520563      0.00015461

      90     14454.3220515      0.00020758

      91     14453.7334237      0.00407233

      92     14452.6665227      0.00738149

      93     14451.7082319      0.00663055

      94     14451.3636825      0.00238414

      95     14451.1072575      0.00177440

      96     14450.9791492      0.00088649

      97     14450.7987591      0.00124829

      98     14450.7461835      0.00036382

      99     14450.7404741      0.00003951

     100     14450.7122659      0.00019520

     101     14450.7012321      0.00007635

     102     14450.6976521      0.00002477

     103     14450.6933763      0.00002959

     104     14450.6926067      0.00000533

     105     14450.6925563      0.00000035

     106     14450.6925303      0.00000018

     107     14450.6925196      0.00000007

     108     14450.6925174      0.00000002

     109     14450.6925173      0.00000000

 

 

  Parameter estimates for adding risk factors

 

     0.896480     0.032059     1.957217     0.039198    -0.004190     2.878760

     0.039044     0.003359    -0.001658     4.794421    -0.866485     0.284051

    -0.028402     0.554953     1.550513     1.330953    -0.066046     0.000000

 

   Parameter estimates

 

     0.896480     0.032059     1.957217     0.039198    -0.004190     2.878760

     0.039044     0.003359    -0.001658     4.794421    -0.866485     0.284051

    -0.028402     0.554953     9.583478    45.175449    36.270095     8.970979

     0.000000     0.000000     0.000000     0.000000     0.000000     0.000000

 

 NOTE: There were 6026 observations read from the data set WORK.IMPORT.

 NOTE: The data set WORK.OP has 5 observations and 17 variables.

 NOTE: The data set WORK.OS has 4 observations and 7 variables.

 NOTE: The data set WORK.OF has 6026 observations and 16 variables.

 NOTE: The data set WORK.OE has 19 observations and 26 variables.

 NOTE: The data set WORK.SSCPTTZ has 20 observations and 21 variables.

 NOTE: The PROCEDURE TRAJ printed page 1.

 NOTE: PROCEDURE TRAJ a utilisé (Durée totale du traitement) :

       real time           2.39 seconds

       cpu time            2.37 seconds

       

 80         %TRAJPLOTNEW(OP,OS)

 NOTE: No units specified for the HTITLE option. The current units associated with GUNIT will be used.

 NOTE: No units specified for the HTEXT option. The current units associated with GUNIT will be used.

 

 NOTE: The data set WORK.CPREDTMP has 17 observations and 1 variables.

 NOTE: PROCEDURE CONTENTS a utilisé (Durée totale du traitement) :

       real time           0.00 seconds

       cpu time            0.00 seconds

      

   NOTE: There were 17 observations read from the data set WORK.CPREDTMP.

 NOTE: DATA statement a utilisé (Durée totale du traitement) :

       real time           0.00 seconds

       cpu time            0.00 seconds

      

  NOTE: Deleting WORK.CPREDTMP (memtype=DATA).

 

 NOTE: PROCEDURE DATASETS a utilisé (Durée totale du traitement) :

       real time           0.00 seconds

       cpu time            0.00 seconds

      

  NOTE: There were 4 observations read from the data set WORK.OS.

 NOTE: DATA statement a utilisé (Durée totale du traitement) :

       real time           0.00 seconds

       cpu time            0.00 seconds

      

  WARNING: There is not enough room to use the specified ACROSS=4. It was only possible to fit 3 legend entries across. The

          default will be used.

 

 NOTE: There were 5 observations read from the data set WORK.OP.

 NOTE: PROCEDURE GPLOT a utilisé (Durée totale du traitement) :

       real time           0.72 seconds

       cpu time            0.37 seconds

       

 81        

 82         OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;

rwollast
Fluorite | Level 6

Hi everyone,

 

One of my colleagues found a solution: Instead of running SAS Studio 3.81, I ran SAS 9.4 (English with DBCS). Using the same syntax, I was able to generate all the important outputs. 

 

Best,


Robin

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 6 replies
  • 1345 views
  • 0 likes
  • 2 in conversation