Hi everyone,
I'm currently working on fitting 21 years of data into Group-Based Trajectory Modeling (GBTM) using PROC TRAJ in SAS. Here's the code snippet I'm using:
sas 9.4
Copy code
PROC TRAJ DATA=OPPOSITN OUTPLOT=OP OUTSTAT=OS OUT=OF OUTEST=OE ITDETAIL CI95M;
ID ID;
VAR O13-O264;
INDEP T1-T252; /* Year – 1992 - 2012 (21 Years) */
MODEL CNORM;
MAX 30;
NGROUPS 3;
ORDER 1 1 2 ;
RUN;
%TRAJPLOT(OP, OS, 'Trajectory Of Year 1991 - 2012', 'Cnorm Model', 'Temp Diff.', 'Time (Months)');
%TRAJPLOTNEW (OP,OS,'Trajectory Of Year 1991 to 2012', 'CNorm Model', 'Temp Diff.', 'Scaled Time');
This code generates a graph, as shown in the attached image. However, I'm facing an issue with the X-axis; it's displaying 300 units, including 48 blank points. Is there a way to modify the TRAJPLOT to plot only the required 252 units on the X-axis, corresponding to the 21-year timeline from 1992 to 2012?
I'm seeking guidance on how to adjust the X-axis in the TRAJPLOT to ensure it only displays the necessary 252 units and eliminates the extra blank points.
Thank you for your help and suggestions!
Best regards,
MD. Sihab Sarar