BookmarkSubscribeRSS Feed
jrichardson134
Calcite | Level 5

Hi there, 

I am working on a project for school, and I am by no means an expert. For every assignment, but this one, we have been given a dataset. So, this is the first time choosing my own.

As, I run Summary Statistics and try to add Analysis Variables it states "no columns are available." It does the same when I try to add a dependent variable for linear regression. 

Here is the code for my data set??

/* Generated Code (IMPORT) */
/* Source File: IRP Data.xlsx */
/* Source Path: /home/u57962939/IS3310 */
/* Code generated on: 9/26/21, 9:08 AM */
 
%web_drop_table(IS3310.IRP);
 
 
FILENAME REFFILE '/home/u57962939/IS3310/IRP Data.xlsx';
 
PROC IMPORT DATAFILE=REFFILE
DBMS=XLSX
OUT=IS3310.IRP;
GETNAMES=YES;
RUN;
 
PROC CONTENTS DATA=IS3310.IRP; RUN;
 
 
%web_open_table(IS3310.IRP);
 
Here is the log:
 
OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
70
71 /* Generated Code (IMPORT) */
72 /* Source File: IRP Data.xlsx */
73 /* Source Path: /home/u57962939/IS3310 */
74 /* Code generated on: 9/26/21, 9:08 AM */
75
76 %web_drop_table(IS3310.IRP);
77
78
79 FILENAME REFFILE '/home/u57962939/IS3310/IRP Data.xlsx';
80
81 PROC IMPORT DATAFILE=REFFILE
82 DBMS=XLSX
83 OUT=IS3310.IRP;
84 GETNAMES=YES;
85 RUN;
 
NOTE: One or more variables were converted because the data type is not supported by the V9 engine. For more details, run with
options MSGLEVEL=I.
NOTE: The import data set has 975 observations and 27 variables.
NOTE: IS3310.IRP data set was successfully created.
NOTE: PROCEDURE IMPORT used (Total process time):
real time 0.24 seconds
user cpu time 0.24 seconds
system cpu time 0.00 seconds
memory 2976.03k
OS Memory 28580.00k
Timestamp 09/26/2021 02:08:43 PM
Step Count 38 Switch Count 2
Page Faults 0
Page Reclaims 697
Page Swaps 0
Voluntary Context Switches 30
Involuntary Context Switches 0
Block Input Operations 208
Block Output Operations 520
 
 
86
87 PROC CONTENTS DATA=IS3310.IRP; RUN;
 
NOTE: PROCEDURE CONTENTS used (Total process time):
real time 0.08 seconds
user cpu time 0.09 seconds
system cpu time 0.00 seconds
memory 2586.87k
OS Memory 28584.00k
Timestamp 09/26/2021 02:08:43 PM
Step Count 39 Switch Count 0
Page Faults 0
Page Reclaims 722
Page Swaps 0
Voluntary Context Switches 10
Involuntary Context Switches 0
Block Input Operations 288
Block Output Operations 32
 
 
88
89
90 %web_open_table(IS3310.IRP);
91
92 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
103
 
User: u57962939
Messages: 9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
US Region
 
 
 
I would really appreciate any help!
15 REPLIES 15
PaigeMiller
Diamond | Level 26

As, I run Summary Statistics and try to add Analysis Variables it states "no columns are available." It does the same when I try to add a dependent variable for linear regression.

 

You have NOT shown us anything like this in the LOG. Show us the LOG for this part of the code.

--
Paige Miller
jrichardson134
Calcite | Level 5

I copied my entire log for the data set. As I stated, I am very new to SAS and am completing this for a school project. Could you be more specific of what I need to show you and where I can find it?

PaigeMiller
Diamond | Level 26

 You said you ran summary statistics, but no LOG from that action is shown. You said you were trying a linear regression, but no LOG from that action is shown.

--
Paige Miller
jrichardson134
Calcite | Level 5

I stated I TRIED to run summary statistics and linear regression, but I was unable to add analysis variables and dependent variables. 

PaigeMiller
Diamond | Level 26

And how did you TRY to run these analyses?

--
Paige Miller
jrichardson134
Calcite | Level 5

I clicked on them to run them, chose my data set, and clicked to add the variables... but no variables are available. 

PaigeMiller
Diamond | Level 26

Can you show us a screen capture of the error message? Click on the "Insert Photos" icon to include screen captures in your reply.

--
Paige Miller
PaigeMiller
Diamond | Level 26

My guess is that your data set was read (perhaps incorrectly) and has no numeric variables, these are all character variables, and so Summarize Data and Linear Regression are not valid methods of analyzing character variables.

 

The output from PROC CONTENTS will show you whether that is the case or not.

--
Paige Miller
Kurt_Bremser
Super User

The rather funny column names let me think that all these variables contain textual data (of type character), which can't be used for the analysis you plan.

To verify this, post the output (not the code, not the log) of a PROC CONTENTS of the dataset.

jrichardson134
Calcite | Level 5

I will only be using two of the 27 columns. 

This is what they look like. 

Is it possible to change one to numeric?

Pecan PieUS Region 
2YesWest South Central 
3NoWest South Central 
4NoWest South Central 
5YesWest South Central 
6YesWest South Central 
7NoWest South Central 
8YesWest South Central 
9YesWest South Central 
10YesWest South Central 
11YesWest South Central 
12NoWest South Central 
13YesWest South Central 
14YesWest South Central 
15NoWest South Central 
16NoWest South Central 
17YesWest South Central 
18YesWest South Central 
19NoWest South Central 
20YesWest South Central 
21YesWest South Central 
22NoWest South Central 
23YesWest South Central 
24NoWest South Central 
25YesWest South Central 
26YesWest South Central 
27YesWest South Central 
28YesWest South Central 
29YesWest South Central 
30YesWest South Central 
31YesWest South Central 
32YesWest South Central 
33NoWest South Central 
34YesWest South Central 
35YesWest South Central 
36YesWest South Central 
37NoWest South Central 
38YesWest South Central 
39NoWest South Central 
40YesWest South Central 
41YesWest South Central 
42NoWest South Central 
43YesWest South Central 
44YesWest South Central 
45NoWest South Central 
46NoWest South Central 
47NoWest South Central 
48YesWest South Central 
49YesWest South Central 
50YesWest South Central 
51YesWest South Central 
52NoWest South Central 
53YesWest South Central 
54NoWest South Central 
55NoWest South Central 
56YesWest South Central 
57NoWest South Central 
58YesWest South Central 
59YesWest South Central 
60YesWest South Central 
61NoWest South Central 
62YesWest South Central 
63YesWest South Central 
64NoWest South Central 
65NoWest South Central 
66YesWest South Central 
67YesWest South Central 
68NoWest South Central 
69NoWest South Central 
70YesWest South Central 
71NoWest South Central 
72NoWest South Central 
73YesWest South Central 
74NoWest South Central 
75NoWest South Central 
76NoWest South Central 
77YesWest South Central 
78YesWest South Central 
79NoWest South Central 
80NoWest South Central 
81YesWest South Central 
82YesWest South Central 
83YesWest South Central 
84YesWest South Central 
85YesWest South Central 
86NoWest North Central 
87NoWest North Central 
88NoWest North Central 
89NoWest North Central 
90YesWest North Central 
91YesWest North Central 
92NoWest North Central 
93YesWest North Central 
94NoWest North Central 
95NoWest North Central 
96YesWest North Central 
97NoWest North Central 
98NoWest North Central 
99NoWest North Central 
100NoWest North Central 
 
PaigeMiller
Diamond | Level 26

I will only be using two of the 27 columns. 

This is what they look like. 

Is it possible to change one to numeric?

Pecan Pie US Region  
2 Yes West South Central  
3 No West South Central  

 

Let's stop here, and ask questions that have nothing to do with SAS, but are directly related to your desire to run summary statistics or a regression on this data.

 

Does it make even the slightest bit of sense to change either variable to numeric? Explain.

 

Again, this has nothing to do with SAS. How would you define the summary statistics of "US Region"? How would you do a regression with "US Region"? How would you define the mean of "Yes" or "No"??

--
Paige Miller

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 15 replies
  • 996 views
  • 0 likes
  • 3 in conversation