<?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 Re: Variable names/order in table in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Variable-names-order-in-table/m-p/925164#M41534</link>
    <description>&lt;P&gt;You have asked questions unrelated to your first post in this thread and unrelated to the subject of this thread. Please start a new thread, with some Subject like "Interaction Plots" so anyone who has a similar problem can find your new thread.&lt;/P&gt;</description>
    <pubDate>Sun, 21 Apr 2024 22:29:52 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2024-04-21T22:29:52Z</dc:date>
    <item>
      <title>Variable names/order in table</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Variable-names-order-in-table/m-p/925158#M41531</link>
      <description>&lt;P&gt;Hello All,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm trying to accomplish two things.&lt;/P&gt;
&lt;P&gt;First, I need to change nine variable names and three table headers in an Odds ratio table. I am trying to do that within proc logistic based on others suggestions on this forum but it is not working.&amp;nbsp; I created another proc logistic before my original code trying to rename the variable (age) and then used "parmlabel" in my original proc logistic code. Code and error are below.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc logistic data=working3 descending;
	age_P3 = Age;
	run;
proc logistic data=working3 descending;  
	age_P3 = Age / parmlabel;  
  	class diabetes_P3 (ref ='No') finalgold_P3 (ref='GOLD 0') race (ref='1') Gender(ref='1');
  	model finalgold_P3(event='GOLD 0') = diabetes_P3 age_P3  BMI_P3 highbloodpres_P3 highcholest_P3
  		cortsterinhal_P3 cortsteroral_P3 smokcignow_P3 gender/ link=glogit;
  	format finalgold_p3 final_gold_stage. diabetes_P3 diabetes_baseline. BMI_P3 
  		BMI_group. highbloodpres_P3 highbloodpres_group. highcholest_P3 highcholest_group. smokcignow_P3 smokcignow_group.
  		cortsterinhal_P3 cortsterinhal_group. cortsteroral_P3 cortsteroral_group. finalgold_P3 Baseline_GOLD_Stage.;
run;
LOG REPORT:
69         proc logistic data=working3 descending;
 70         age_P3 = Age;
             ______
             180
 ERROR 180-322: Statement is not valid or it is used out of proper order.
 71         run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Second, I need to reorder the finalGOLD_P3 category from PRISm to GOLD 4 instead of GOLD 1 to PRISm.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kristiepauly_0-1713729194879.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/95729i9D2C85C6A16B8EAD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="kristiepauly_0-1713729194879.png" alt="kristiepauly_0-1713729194879.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Any suggestions?&amp;nbsp;&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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 21 Apr 2024 20:08:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Variable-names-order-in-table/m-p/925158#M41531</guid>
      <dc:creator>kristiepauly</dc:creator>
      <dc:date>2024-04-21T20:08:18Z</dc:date>
    </item>
    <item>
      <title>Re: Variable names/order in table</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Variable-names-order-in-table/m-p/925160#M41532</link>
      <description>&lt;P&gt;There is no such statement that appears to equate one variable to another within PROC LOGISTIC.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;age_P3 = Age;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Not sure what you are trying to do with the above statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want a table in a specific order, probably best if you use ODS OUTPUT to create the table as a SAS data set, sort it in whatever order you want, and then run PROC PRINT.&lt;/P&gt;</description>
      <pubDate>Sun, 21 Apr 2024 20:26:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Variable-names-order-in-table/m-p/925160#M41532</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2024-04-21T20:26:04Z</dc:date>
    </item>
    <item>
      <title>Re: Variable names/order in table</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Variable-names-order-in-table/m-p/925162#M41533</link>
      <description>&lt;P&gt;I am trying to see if there is a difference in the change in pulmonary function in people with diabetes vs those without over a 10 year time period.&amp;nbsp; I wrote this to calculate the change.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data working4;
	set working3; 
	change_fev1pp = fev1pp_Post_p3 - fev1pp_Post_p1;
	change_fev1_FVC = fev1_FVC_post_p3 - Fev1_FVC_post_p1;
	run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I used proc glm to give me the type III table and the interaction plot for change in fev1pp.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc glm data=working4;
	class diabetes_P1(ref='No') finalgold_P1 (ref='GOLD 0');
	model change_fev1pp = diabetes_P1 finalgold_p1 diabetes_P1*finalgold_p1;
	lsmeans diabetes_P1 finalgold_p1 diabetes_P1*finalgold_p1 / pdiff;
	format finalgold_p1 baseline_gold_stage. diabetes_P1 diabetes_baseline.;
	run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Here is the output I get:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2024-04-21 160243.png" style="width: 784px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/95731iD1995D66FF5A385C/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2024-04-21 160243.png" alt="Screenshot 2024-04-21 160243.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I need this same output but after I adjust for several variables (age, gender, bmi, high bp, high cholesterol, corticosteroid use, smoking status). I first tried to do this using Proc glm&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc glm data=working4;
	class diabetes_P1(ref='No') finalgold_P1(ref='GOLD 0') Gender(ref='1') BMI_P1(ref='Healthy')
	highbloodpres_P1(ref='No') highcholest_P1(ref='No')
  		cortsterinhal_P1(ref='No') cortsteroral_P1(ref='No') smokcignow_P1(ref='No');
	model change_fev1pp = diabetes_P1 finalgold_P1 diabetes_P1*finalgold_P1
	 BMI_P1 highbloodpres_P1 highcholest_P1 age_P1
  		cortsterinhal_P1 cortsteroral_P1 smokcignow_P1 gender;
	lsmeans diabetes_P1 finalgold_p1 diabetes_P1*finalgold_p1 / pdiff;
	format finalgold_P1 final_gold_stage. diabetes_P1 diabetes_final. BMI_P1 
  		BMI_group. highbloodpres_P1 highbloodpres_group. highcholest_P1 highcholest_group. smokcignow_P1 smokcignow_group.
  		cortsterinhal_P1 cortsterinhal_group. cortsteroral_P1 cortsteroral_group.;
	run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and I get the type III table but not the interaction plot. Is this interaction plot not possible when including variables I'm adjusting for or did I do it wrong?&amp;nbsp; Is there a better visual representation to show the change in fev1pp by GOLD stage over 10 years time in people with diabetes vs without?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I also tried to adjust for the variables in proc logistic, but that wasn't right either.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc logistic data=working4;
  	class diabetes_P1 (ref ='No') finalgold_P1 (ref='GOLD 0') race (ref='1') Gender(ref='1') BMI_P3(ref='Healthy')
	highbloodpres_P3(ref='No') highcholest_P3(ref='No') 
  		cortsterinhal_P3(ref='No') cortsteroral_P3(ref='No') smokcignow_P3(ref='No');
  	model change_fev1pp = diabetes_P1 finalgold_p1 diabetes_P1*finalgold_p1
  		age_P3  BMI_P3 highbloodpres_P3 highcholest_P3
  		cortsterinhal_P3 cortsteroral_P3 smokcignow_P3 gender/ link=glogit;
  		lsmeans diabetes_P1 finalgold_p1 diabetes_P1*finalgold_p1 / pdiff;
  	format finalgold_p1 final_gold_stage. diabetes_P1 diabetes_baseline. BMI_P3 
  		BMI_group. highbloodpres_P3 highbloodpres_group. highcholest_P3 highcholest_group. smokcignow_P3 smokcignow_group.
  		cortsterinhal_P3 cortsterinhal_group. cortsteroral_P3 cortsteroral_group. finalgold_P3 Baseline_GOLD_Stage.;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But get this error.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt; ERROR: Computations are terminated because the number of response levels, 614, exceeds MAXRESPONSELEVELS=100.
 NOTE: The SAS System stopped processing this step because of errors.
 NOTE: There were 2864 observations read from the data set WORK.WORKING4.
 NOTE: PROCEDURE LOGISTIC used (Total process time):
       real time           0.19 seconds
       user cpu time       0.17 seconds
       system cpu time     0.02 seconds
       memory              33575.15k
       OS Memory           61600.00k
       Timestamp           04/21/2024 10:06:27 PM
       Step Count                        525  Switch Count  0
       Page Faults                       0
       Page Reclaims                     8318
       Page Swaps                        0
       Voluntary Context Switches        0
       Involuntary Context Switches      0
       Block Input Operations            0
       Block Output Operations           40
       
 81         
 82         OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;/PRE&gt;
&lt;P&gt;Thanks.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 21 Apr 2024 22:21:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Variable-names-order-in-table/m-p/925162#M41533</guid>
      <dc:creator>kristiepauly</dc:creator>
      <dc:date>2024-04-21T22:21:55Z</dc:date>
    </item>
    <item>
      <title>Re: Variable names/order in table</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Variable-names-order-in-table/m-p/925164#M41534</link>
      <description>&lt;P&gt;You have asked questions unrelated to your first post in this thread and unrelated to the subject of this thread. Please start a new thread, with some Subject like "Interaction Plots" so anyone who has a similar problem can find your new thread.&lt;/P&gt;</description>
      <pubDate>Sun, 21 Apr 2024 22:29:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Variable-names-order-in-table/m-p/925164#M41534</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2024-04-21T22:29:52Z</dc:date>
    </item>
    <item>
      <title>Re: Variable names/order in table</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Variable-names-order-in-table/m-p/925165#M41535</link>
      <description>&lt;P&gt;I apologize.&amp;nbsp; I was doing too many things at once.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 21 Apr 2024 22:56:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Variable-names-order-in-table/m-p/925165#M41535</guid>
      <dc:creator>kristiepauly</dc:creator>
      <dc:date>2024-04-21T22:56:33Z</dc:date>
    </item>
  </channel>
</rss>

