hello everyone!, I want to revise the figure of the group-based trajectory models, when I use the proc traj -plotnew fig1 was demonstrated, but i want to revise it into the figure like fig2. fig1 revised version fig2 my codes are as follows: ODS GRAPHICS ON; PROC TRAJ DATA=D1 OUT=P1 OUTSTAT=P2 OUTPLOT=P3 ITDETAIL; ID ID; VAR VAR1-VAR4; INDEP T1-T4; MODEL CNORM; MAX 10; NGROUPS 3;ORDER 3 3 3; RUN; DATA PLOT1; SET D1; ARRAY VV{*}VAR1-VAR4; ARRAY TT{*}T1-T4; DO I=1TO DIM(VV); IDD=ID; TIME=TT(I); VALUE=VV(I); OUTPUT; END; KEEP TIME VALUE IDD; RUN; PROC MEANS DATA=D1 N NMISS MEAN STDDEV STDERR MIN P25 MEDIAN P75 MAX QRANGE CLM; VAR VAR1-VAR4 T1-T4; RUN; PROC SGPLOT DATA=PLOT1; VBOX VALUE/GROUP=TIME; RUN; ODS HTML DPI=300; PROC SGPLOT DATA=PLOT1; VLINE TIME/RESPONSE=VALUE GROUP=IDD; RUN; %macro traj_M(DATA,ID,AVEPP,EST,PLOT,STAT,VAR,INDEP,NGROUPS,ORDER,TITLE); PROC TRAJ DATA=&DATA. OUTPLOT=&PLOT. OUT=&AVEPP. OUTSTAT=&STAT. OUTEST=&EST. ITDETAIL CI95M; ID &ID.; VAR &VAR.; INDEP &INDEP.; MODEL CNORM; MIN 0; MAX 10; NGROUPS &NGROUPS.; ORDER &ORDER.; RUN; PROC SORT DATA=&AVEPP.;BY GROUP; RUN; ODS HTML DEI=300; %TRAJPLOTNEW(&PLOT,&STAT,"ZBMI",'CNORM MODEL','BMI','TIME(MONTH)'); QUIT; %MEND; %LET DATA=D1; %LET PREFIX=TEST_; %LET VAR=VAR1-VAR4; %LET INDEP=T1-T4; %LET ID=ID; %LET POSTFIX=3_333; %LET N_GRP=3; %TRAJ_M(DATA=&DATA.,ID=&ID.,AVEPP=&PREFIX.AVEPP_&POSTFIX.,EST=&prefix.est_&postfix., plot=&prefix.plot_&postfix.,stat=&prefix.stat_&postfix.,var=&var.,indep=&indep.,ngroups=&n_GRP., order=3 3 3,title="&postfix."); and I also want to assess the model fit write the flollowing code: %TRAJ_ASSESS(AVEPP=&PREFIX.AVEPP_&POSTFIX.,STAT=&PREFIX.STAT_POSTFIX.,EST=&PREFIX.EST_&POSTFIX., BASE=M_SELECT,LABEL="&POSTFIX."); but when i run it in the system report like that: fig3 and then I further write the folloing code to revise my figure; %TRAJ_PLOT(DATA=&DATA.,ID=&ID.,AVEPP=&PREFIX.AVEPP_&POSTFIX.,EST=&prefix.est_&postfix. PLOT=&PREFIX.PLOT_&POSTFIX.,STAT=&PREFIX.STAT_POSTFIX.,GROUP=3,TRAJ1=A,TRAJ2=B,TRAJ3=C); but the system reported as the same problem like fig 3. i don't know how to solve this problem.
... View more