<?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 Labeled variable cannot be found in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Labeled-variable-cannot-be-found/m-p/886976#M39352</link>
    <description>&lt;P&gt;Hi all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I ran the below code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;proc reg data = wine;
model quality = alcohol 'volatile acidity'n sulphates 'total_sulfur dioxide'n chlorides pH 'sulphates total sulfur dioxide'n 'volatile acidity totsd'n 'alcohol sulphates'n 'sulphates pH'n/ influence;
output out = influencestats cookd = cooksd dffits = dffits h = hatmat p = preds r = resid;
rstudent = studdelresid student=studres;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I got this error message:&lt;/P&gt;&lt;PRE&gt; 1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 68         
 69         proc reg data = wine;
 70         model quality = alcohol 'volatile acidity'n sulphates 'total_sulfur dioxide'n chlorides pH 'sulphates total sulfur
 70       ! dioxide'n 'volatile acidity totsd'n 'alcohol sulphates'n 'sulphates pH'n/ influence; /* n = 20, p = 3*/
 ERROR: Variable 'total_sulfur dioxide'n not found.
 ERROR: Variable 'sulphates total sulfur dioxide'n not found.
 ERROR: Variable 'volatile acidity totsd'n not found.
 ERROR: Variable 'alcohol sulphates'n not found.
 ERROR: Variable 'sulphates pH'n not found.
 NOTE: The previous statement has been deleted.
 71         output out = influencestats cookd = cooksd dffits = dffits h = hatmat p = preds r = resid;
 72         rstudent = studdelresid student=studres;
            ________
            180
 NOTE: The previous statement has been deleted.
 ERROR 180-322: Statement is not valid or it is used out of proper order.
 73         run;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And I checked the table contents, no variable name error here:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2023-07-29 at 12.47.07.png" style="width: 582px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/86241iC947D057F1D35BF4/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2023-07-29 at 12.47.07.png" alt="Screenshot 2023-07-29 at 12.47.07.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;How can I resolve the error in the code? Thanks in advance!!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 29 Jul 2023 17:53:32 GMT</pubDate>
    <dc:creator>mding1</dc:creator>
    <dc:date>2023-07-29T17:53:32Z</dc:date>
    <item>
      <title>Labeled variable cannot be found</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Labeled-variable-cannot-be-found/m-p/886976#M39352</link>
      <description>&lt;P&gt;Hi all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I ran the below code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;proc reg data = wine;
model quality = alcohol 'volatile acidity'n sulphates 'total_sulfur dioxide'n chlorides pH 'sulphates total sulfur dioxide'n 'volatile acidity totsd'n 'alcohol sulphates'n 'sulphates pH'n/ influence;
output out = influencestats cookd = cooksd dffits = dffits h = hatmat p = preds r = resid;
rstudent = studdelresid student=studres;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I got this error message:&lt;/P&gt;&lt;PRE&gt; 1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 68         
 69         proc reg data = wine;
 70         model quality = alcohol 'volatile acidity'n sulphates 'total_sulfur dioxide'n chlorides pH 'sulphates total sulfur
 70       ! dioxide'n 'volatile acidity totsd'n 'alcohol sulphates'n 'sulphates pH'n/ influence; /* n = 20, p = 3*/
 ERROR: Variable 'total_sulfur dioxide'n not found.
 ERROR: Variable 'sulphates total sulfur dioxide'n not found.
 ERROR: Variable 'volatile acidity totsd'n not found.
 ERROR: Variable 'alcohol sulphates'n not found.
 ERROR: Variable 'sulphates pH'n not found.
 NOTE: The previous statement has been deleted.
 71         output out = influencestats cookd = cooksd dffits = dffits h = hatmat p = preds r = resid;
 72         rstudent = studdelresid student=studres;
            ________
            180
 NOTE: The previous statement has been deleted.
 ERROR 180-322: Statement is not valid or it is used out of proper order.
 73         run;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And I checked the table contents, no variable name error here:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2023-07-29 at 12.47.07.png" style="width: 582px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/86241iC947D057F1D35BF4/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2023-07-29 at 12.47.07.png" alt="Screenshot 2023-07-29 at 12.47.07.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;How can I resolve the error in the code? Thanks in advance!!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 29 Jul 2023 17:53:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Labeled-variable-cannot-be-found/m-p/886976#M39352</guid>
      <dc:creator>mding1</dc:creator>
      <dc:date>2023-07-29T17:53:32Z</dc:date>
    </item>
    <item>
      <title>Re: Labeled variable cannot be found</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Labeled-variable-cannot-be-found/m-p/886978#M39353</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The first error you get&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; ERROR: Variable 'total_sulfur dioxide'n not found.&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;is because you have typed an underscore between total and sulfur, and the variable name, as shown by PROC CONTENTS, does not have an underscore.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can't tell about the other errors, as many of the variable names you have typed do not show up in the part of PROC CONTENTS that you have showed us, so I leave it up to you to investigate further.&lt;/P&gt;</description>
      <pubDate>Sat, 29 Jul 2023 18:03:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Labeled-variable-cannot-be-found/m-p/886978#M39353</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-07-29T18:03:41Z</dc:date>
    </item>
    <item>
      <title>Re: Labeled variable cannot be found</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Labeled-variable-cannot-be-found/m-p/886979#M39354</link>
      <description>&lt;P&gt;Things to test.&lt;/P&gt;
&lt;P&gt;1) Make sure you actually are using the same dataset as you ran the CONTENTS on.&lt;/P&gt;
&lt;P&gt;2)&amp;nbsp;That photograph looks like a picture of ODS output (probably HTML output).&amp;nbsp;The ODS processor has a nasty habit of not displaying leading spaces.&amp;nbsp; So check to make sure the variable names do not have leading spaces that you need include in the name literals.&amp;nbsp; You could try printing the name values the $quote. format so that it prints quotes around the name.&lt;/P&gt;
&lt;P&gt;Or perhaps just use the NLITERAL() function to print the name literals and then copy and paste the result into your code.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc contents data=wine noprint out=contents; run;
data _null_;
  set contents;
  length nliteral $64 ;
  nliteral=nliteral(name);
  put nliteral;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 29 Jul 2023 18:07:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Labeled-variable-cannot-be-found/m-p/886979#M39354</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-07-29T18:07:29Z</dc:date>
    </item>
  </channel>
</rss>

