Reputation: 13
I am a beginner level programmer in SAS and I am running into some issues trying to do LR.
I am trying to run a multivariate linear regression on a dataset (ads.csv, predicting sales based on the TV, radio, and newspapers figures)
S_no,TV,Radio,Newspaper,Sales
1,230.1,37.8,69.2,22.1
2,44.5,39.3,45.1,10.4
3,17.2,45.9,69.3,9.3
4,151.5,41.3,58.5,18.5
However when I run the linear regression in SAS using the initial coded to declare the output data, I get an error that saying : ERROR: Output SAS data set must be provided.
options linesize=180 pagesize=180 nodate pageno=1;
libname Linreg1 "/folders/myfolders";
proc import datafile="/folders/myfolders/ads.csv";
out=Linreg1.output dbms=dlm replace;
delimiter=,;
getnames=yes;
run;
Following is the complete log of this small piece of code :
1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
55
56 options linesize=180 pagesize=180 nodate pageno=1;
57 libname Linreg1 "/folders/myfolders";
NOTE: Libref LINREG1 was successfully assigned as follows:
Engine: V9
Physical Name: /folders/myfolders
58 proc import datafile="/folders/myfolders/ads.csv";
ERROR: Output SAS data set must be provided.
NOTE: The SAS System stopped processing this step because of errors.
Any help would be greatly appreciated!
Upvotes: 0
Views: 302
Reputation: 2252
[Edit: as Reeza said in that first comment] There are extra semicolons in there - your proc import line needs to read as below:
options linesize=180 pagesize=180 nodate pageno=1;
libname Linreg1 "/folders/myfolders";
proc import datafile="/folders/myfolders/ads.csv" out=Linreg1.output dbms=dlm replace;
delimiter=,;
getnames=yes;
run;
Upvotes: 0