<?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: Using Label as Variable Name in a Linear Regression in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Using-Label-as-Variable-Name-in-a-Linear-Regression/m-p/906082#M40480</link>
    <description>&lt;P&gt;By "Use labels as variable names," I assume you want to use nice labels on the X and Y axes on the fit plot. If so, use the LABEL statement inside the PROC REG step, like this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC REG DATA=WORK.FIGURE (RENAME = outcomes_adults_mental_distr = Frequent_Mental_Distress)
PLOTS(ONLY) = FITPLOT;
label Frequent_Mental_Distress= "Frequent Mental Distress"
      Marijuana_Use = "Marijuana Use (Grams per Day)";
 MODEL Frequent_Mental_Distress = Marijuana_Use / CLM CLI ALPHA=0.05;
ODS SELECT FitPlot;
quit;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;It is possible to remove the MODEL : MODEL1 tag, but it is an advanced technique. Most people prefer to see a reasonable name for the model, such as follows:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options validvarname=any;
PROC REG... ;
/* specify a label before the MODEL keyword */
'Distress vs Marijuana'n:
MODEL Frequent_Mental_Distress = Marijuana_Use / CLM CLI ALPHA=0.05;
quit;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 04 Dec 2023 18:42:51 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2023-12-04T18:42:51Z</dc:date>
    <item>
      <title>Using Label as Variable Name in a Linear Regression</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Using-Label-as-Variable-Name-in-a-Linear-Regression/m-p/906067#M40479</link>
      <description>&lt;P&gt;Hi SAS coders,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am new to SAS and was wondering if it is possible to use labels as the variable names for a PROC REG?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's my code:&lt;/P&gt;
&lt;P&gt;ODS NOPROCTITLE;&lt;BR /&gt;PROC REG DATA=WORK.FIGURE (RENAME = outcomes_adults_mental_distr = Frequent_Mental_Distress) &lt;BR /&gt;PLOTS(ONLY) = FITPLOT;&lt;BR /&gt;MODEL Frequent_Mental_Distress = Marijuana_Use /&lt;BR /&gt;CLM&lt;BR /&gt;CLI &lt;BR /&gt;ALPHA=0.05;&lt;/P&gt;
&lt;P&gt;TITLE "Linear Regression of Frequent Mental Distress and Marijuana Use";&lt;BR /&gt;ODS SELECT FitPlot;&lt;BR /&gt;RUN;&lt;BR /&gt;TITLE;&lt;/P&gt;
&lt;P&gt;The output looks like this:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2023-12-04 102544.png" style="width: 683px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/90754i7361A5145C2C11E4/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2023-12-04 102544.png" alt="Screenshot 2023-12-04 102544.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I want it to show that Marijuana_Use and Frequent_Mental_Distress is displayed as their labels and I also was wondering if I can delete the "Model: MODEL1" out?&lt;/P&gt;
&lt;P&gt;Any help is appreciated.&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 04 Dec 2023 17:28:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Using-Label-as-Variable-Name-in-a-Linear-Regression/m-p/906067#M40479</guid>
      <dc:creator>kcvaldez98</dc:creator>
      <dc:date>2023-12-04T17:28:22Z</dc:date>
    </item>
    <item>
      <title>Re: Using Label as Variable Name in a Linear Regression</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Using-Label-as-Variable-Name-in-a-Linear-Regression/m-p/906082#M40480</link>
      <description>&lt;P&gt;By "Use labels as variable names," I assume you want to use nice labels on the X and Y axes on the fit plot. If so, use the LABEL statement inside the PROC REG step, like this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC REG DATA=WORK.FIGURE (RENAME = outcomes_adults_mental_distr = Frequent_Mental_Distress)
PLOTS(ONLY) = FITPLOT;
label Frequent_Mental_Distress= "Frequent Mental Distress"
      Marijuana_Use = "Marijuana Use (Grams per Day)";
 MODEL Frequent_Mental_Distress = Marijuana_Use / CLM CLI ALPHA=0.05;
ODS SELECT FitPlot;
quit;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;It is possible to remove the MODEL : MODEL1 tag, but it is an advanced technique. Most people prefer to see a reasonable name for the model, such as follows:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options validvarname=any;
PROC REG... ;
/* specify a label before the MODEL keyword */
'Distress vs Marijuana'n:
MODEL Frequent_Mental_Distress = Marijuana_Use / CLM CLI ALPHA=0.05;
quit;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Dec 2023 18:42:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Using-Label-as-Variable-Name-in-a-Linear-Regression/m-p/906082#M40480</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2023-12-04T18:42:51Z</dc:date>
    </item>
  </channel>
</rss>

