<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic how to revisede the figure of the  group-based trajectory model in SAS9.4? in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/how-to-revisede-the-figure-of-the-group-based-trajectory-model/m-p/895819#M44435</link>
    <description>&lt;P&gt;hello everyone!, I want to revise the figure of the group-based trajectory models,&amp;nbsp; when I use the proc traj -plotnew fig1 was demonstrated, but i want to revise it into the figure like fig2.&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ay05_0-1695692656396.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/88324iE41CE31D32A36CAE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ay05_0-1695692656396.png" alt="ay05_0-1695692656396.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;fig1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;revised version&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ay05_2-1695691805472.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/88321iD6030C7077453070/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ay05_2-1695691805472.png" alt="ay05_2-1695691805472.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fig2&lt;/P&gt;&lt;P&gt;my codes are as follows:&lt;/P&gt;&lt;P&gt;ODS GRAPHICS ON;&lt;BR /&gt;PROC TRAJ DATA=D1 OUT=P1 OUTSTAT=P2 OUTPLOT=P3 ITDETAIL;&lt;BR /&gt;ID ID;&lt;BR /&gt;VAR VAR1-VAR4; INDEP T1-T4;&lt;BR /&gt;MODEL CNORM; MAX 10;&lt;BR /&gt;NGROUPS 3;ORDER 3 3 3;&lt;BR /&gt;RUN;&lt;BR /&gt;DATA PLOT1;&lt;BR /&gt;SET D1;&lt;BR /&gt;ARRAY VV{*}VAR1-VAR4;&lt;BR /&gt;ARRAY TT{*}T1-T4;&lt;BR /&gt;DO I=1TO DIM(VV);&lt;BR /&gt;IDD=ID;&lt;BR /&gt;TIME=TT(I);&lt;BR /&gt;VALUE=VV(I);&lt;BR /&gt;OUTPUT;&lt;BR /&gt;END;&lt;BR /&gt;KEEP TIME VALUE IDD;&lt;BR /&gt;RUN;&lt;BR /&gt;PROC MEANS DATA=D1 N NMISS MEAN STDDEV STDERR MIN P25 MEDIAN P75 MAX QRANGE CLM;&lt;BR /&gt;VAR VAR1-VAR4 T1-T4;&lt;BR /&gt;RUN;&lt;BR /&gt;PROC SGPLOT DATA=PLOT1;&lt;BR /&gt;VBOX VALUE/GROUP=TIME;&lt;BR /&gt;RUN;&lt;BR /&gt;ODS HTML DPI=300;&lt;BR /&gt;PROC SGPLOT DATA=PLOT1;&lt;BR /&gt;VLINE TIME/RESPONSE=VALUE GROUP=IDD;&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;%macro traj_M(DATA,ID,AVEPP,EST,PLOT,STAT,VAR,INDEP,NGROUPS,ORDER,TITLE);&lt;BR /&gt;PROC TRAJ DATA=&amp;amp;DATA. OUTPLOT=&amp;amp;PLOT. OUT=&amp;amp;AVEPP. OUTSTAT=&amp;amp;STAT. OUTEST=&amp;amp;EST. ITDETAIL CI95M;&lt;BR /&gt;ID &amp;amp;ID.;&lt;BR /&gt;VAR &amp;amp;VAR.;&lt;BR /&gt;INDEP &amp;amp;INDEP.;&lt;BR /&gt;MODEL CNORM;&lt;BR /&gt;MIN 0;&lt;BR /&gt;MAX 10;&lt;BR /&gt;NGROUPS &amp;amp;NGROUPS.;&lt;BR /&gt;ORDER &amp;amp;ORDER.;&lt;BR /&gt;RUN;&lt;BR /&gt;PROC SORT DATA=&amp;amp;AVEPP.;BY GROUP;&lt;BR /&gt;RUN;&lt;BR /&gt;ODS HTML DEI=300;&lt;BR /&gt;%TRAJPLOTNEW(&amp;amp;PLOT,&amp;amp;STAT,"ZBMI",'CNORM MODEL','BMI','TIME(MONTH)');&lt;BR /&gt;QUIT;&lt;BR /&gt;%MEND;&lt;BR /&gt;%LET DATA=D1;&lt;BR /&gt;%LET PREFIX=TEST_;&lt;BR /&gt;%LET VAR=VAR1-VAR4;&lt;BR /&gt;%LET INDEP=T1-T4;&lt;BR /&gt;%LET ID=ID;&lt;BR /&gt;%LET POSTFIX=3_333;&lt;BR /&gt;%LET N_GRP=3;&lt;BR /&gt;%TRAJ_M(DATA=&amp;amp;DATA.,ID=&amp;amp;ID.,AVEPP=&amp;amp;PREFIX.AVEPP_&amp;amp;POSTFIX.,EST=&amp;amp;prefix.est_&amp;amp;postfix.,&lt;BR /&gt;plot=&amp;amp;prefix.plot_&amp;amp;postfix.,stat=&amp;amp;prefix.stat_&amp;amp;postfix.,var=&amp;amp;var.,indep=&amp;amp;indep.,ngroups=&amp;amp;n_GRP.,&lt;BR /&gt;order=3 3 3,title="&amp;amp;postfix.");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and&amp;nbsp; I also want to assess the model fit write the flollowing code:&lt;/P&gt;&lt;P&gt;%TRAJ_ASSESS(AVEPP=&amp;amp;PREFIX.AVEPP_&amp;amp;POSTFIX.,STAT=&amp;amp;PREFIX.STAT_POSTFIX.,EST=&amp;amp;PREFIX.EST_&amp;amp;POSTFIX.,&lt;BR /&gt;BASE=M_SELECT,LABEL="&amp;amp;POSTFIX.");&lt;/P&gt;&lt;P&gt;but when i run it in the system report like that:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ay05_1-1695694139833.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/88327i8B1258AB46ED3458/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ay05_1-1695694139833.png" alt="ay05_1-1695694139833.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;fig3&lt;/P&gt;&lt;P&gt;and then I further write the folloing code to revise my figure;&lt;/P&gt;&lt;P&gt;%TRAJ_PLOT(DATA=&amp;amp;DATA.,ID=&amp;amp;ID.,AVEPP=&amp;amp;PREFIX.AVEPP_&amp;amp;POSTFIX.,EST=&amp;amp;prefix.est_&amp;amp;postfix. PLOT=&amp;amp;PREFIX.PLOT_&amp;amp;POSTFIX.,STAT=&amp;amp;PREFIX.STAT_POSTFIX.,GROUP=3,TRAJ1=A,TRAJ2=B,TRAJ3=C);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but the system reported as the same problem like fig 3. i don't know how to solve this problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 26 Sep 2023 02:19:14 GMT</pubDate>
    <dc:creator>ay05</dc:creator>
    <dc:date>2023-09-26T02:19:14Z</dc:date>
    <item>
      <title>how to revisede the figure of the  group-based trajectory model in SAS9.4?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/how-to-revisede-the-figure-of-the-group-based-trajectory-model/m-p/895819#M44435</link>
      <description>&lt;P&gt;hello everyone!, I want to revise the figure of the group-based trajectory models,&amp;nbsp; when I use the proc traj -plotnew fig1 was demonstrated, but i want to revise it into the figure like fig2.&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ay05_0-1695692656396.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/88324iE41CE31D32A36CAE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ay05_0-1695692656396.png" alt="ay05_0-1695692656396.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;fig1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;revised version&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ay05_2-1695691805472.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/88321iD6030C7077453070/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ay05_2-1695691805472.png" alt="ay05_2-1695691805472.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fig2&lt;/P&gt;&lt;P&gt;my codes are as follows:&lt;/P&gt;&lt;P&gt;ODS GRAPHICS ON;&lt;BR /&gt;PROC TRAJ DATA=D1 OUT=P1 OUTSTAT=P2 OUTPLOT=P3 ITDETAIL;&lt;BR /&gt;ID ID;&lt;BR /&gt;VAR VAR1-VAR4; INDEP T1-T4;&lt;BR /&gt;MODEL CNORM; MAX 10;&lt;BR /&gt;NGROUPS 3;ORDER 3 3 3;&lt;BR /&gt;RUN;&lt;BR /&gt;DATA PLOT1;&lt;BR /&gt;SET D1;&lt;BR /&gt;ARRAY VV{*}VAR1-VAR4;&lt;BR /&gt;ARRAY TT{*}T1-T4;&lt;BR /&gt;DO I=1TO DIM(VV);&lt;BR /&gt;IDD=ID;&lt;BR /&gt;TIME=TT(I);&lt;BR /&gt;VALUE=VV(I);&lt;BR /&gt;OUTPUT;&lt;BR /&gt;END;&lt;BR /&gt;KEEP TIME VALUE IDD;&lt;BR /&gt;RUN;&lt;BR /&gt;PROC MEANS DATA=D1 N NMISS MEAN STDDEV STDERR MIN P25 MEDIAN P75 MAX QRANGE CLM;&lt;BR /&gt;VAR VAR1-VAR4 T1-T4;&lt;BR /&gt;RUN;&lt;BR /&gt;PROC SGPLOT DATA=PLOT1;&lt;BR /&gt;VBOX VALUE/GROUP=TIME;&lt;BR /&gt;RUN;&lt;BR /&gt;ODS HTML DPI=300;&lt;BR /&gt;PROC SGPLOT DATA=PLOT1;&lt;BR /&gt;VLINE TIME/RESPONSE=VALUE GROUP=IDD;&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;%macro traj_M(DATA,ID,AVEPP,EST,PLOT,STAT,VAR,INDEP,NGROUPS,ORDER,TITLE);&lt;BR /&gt;PROC TRAJ DATA=&amp;amp;DATA. OUTPLOT=&amp;amp;PLOT. OUT=&amp;amp;AVEPP. OUTSTAT=&amp;amp;STAT. OUTEST=&amp;amp;EST. ITDETAIL CI95M;&lt;BR /&gt;ID &amp;amp;ID.;&lt;BR /&gt;VAR &amp;amp;VAR.;&lt;BR /&gt;INDEP &amp;amp;INDEP.;&lt;BR /&gt;MODEL CNORM;&lt;BR /&gt;MIN 0;&lt;BR /&gt;MAX 10;&lt;BR /&gt;NGROUPS &amp;amp;NGROUPS.;&lt;BR /&gt;ORDER &amp;amp;ORDER.;&lt;BR /&gt;RUN;&lt;BR /&gt;PROC SORT DATA=&amp;amp;AVEPP.;BY GROUP;&lt;BR /&gt;RUN;&lt;BR /&gt;ODS HTML DEI=300;&lt;BR /&gt;%TRAJPLOTNEW(&amp;amp;PLOT,&amp;amp;STAT,"ZBMI",'CNORM MODEL','BMI','TIME(MONTH)');&lt;BR /&gt;QUIT;&lt;BR /&gt;%MEND;&lt;BR /&gt;%LET DATA=D1;&lt;BR /&gt;%LET PREFIX=TEST_;&lt;BR /&gt;%LET VAR=VAR1-VAR4;&lt;BR /&gt;%LET INDEP=T1-T4;&lt;BR /&gt;%LET ID=ID;&lt;BR /&gt;%LET POSTFIX=3_333;&lt;BR /&gt;%LET N_GRP=3;&lt;BR /&gt;%TRAJ_M(DATA=&amp;amp;DATA.,ID=&amp;amp;ID.,AVEPP=&amp;amp;PREFIX.AVEPP_&amp;amp;POSTFIX.,EST=&amp;amp;prefix.est_&amp;amp;postfix.,&lt;BR /&gt;plot=&amp;amp;prefix.plot_&amp;amp;postfix.,stat=&amp;amp;prefix.stat_&amp;amp;postfix.,var=&amp;amp;var.,indep=&amp;amp;indep.,ngroups=&amp;amp;n_GRP.,&lt;BR /&gt;order=3 3 3,title="&amp;amp;postfix.");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and&amp;nbsp; I also want to assess the model fit write the flollowing code:&lt;/P&gt;&lt;P&gt;%TRAJ_ASSESS(AVEPP=&amp;amp;PREFIX.AVEPP_&amp;amp;POSTFIX.,STAT=&amp;amp;PREFIX.STAT_POSTFIX.,EST=&amp;amp;PREFIX.EST_&amp;amp;POSTFIX.,&lt;BR /&gt;BASE=M_SELECT,LABEL="&amp;amp;POSTFIX.");&lt;/P&gt;&lt;P&gt;but when i run it in the system report like that:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ay05_1-1695694139833.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/88327i8B1258AB46ED3458/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ay05_1-1695694139833.png" alt="ay05_1-1695694139833.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;fig3&lt;/P&gt;&lt;P&gt;and then I further write the folloing code to revise my figure;&lt;/P&gt;&lt;P&gt;%TRAJ_PLOT(DATA=&amp;amp;DATA.,ID=&amp;amp;ID.,AVEPP=&amp;amp;PREFIX.AVEPP_&amp;amp;POSTFIX.,EST=&amp;amp;prefix.est_&amp;amp;postfix. PLOT=&amp;amp;PREFIX.PLOT_&amp;amp;POSTFIX.,STAT=&amp;amp;PREFIX.STAT_POSTFIX.,GROUP=3,TRAJ1=A,TRAJ2=B,TRAJ3=C);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but the system reported as the same problem like fig 3. i don't know how to solve this problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Sep 2023 02:19:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/how-to-revisede-the-figure-of-the-group-based-trajectory-model/m-p/895819#M44435</guid>
      <dc:creator>ay05</dc:creator>
      <dc:date>2023-09-26T02:19:14Z</dc:date>
    </item>
  </channel>
</rss>

