Programming the statistical procedures from SAS

error in Log using the collinearity

Reply
N/A
Posts: 0

error in Log using the collinearity

Hello,

I'm gettina errror in log .I used the code -

libname sc 'c:\Sas\sales';
data test;
proc reg;
model Score = Processor Memory Disk Video Battery/ collin;
proc print data = test;
Run;

log -

ERROR: Variable SCORE not found.
ERROR: Variable PROCESSOR not found.
ERROR: Variable MEMORY not found.
ERROR: Variable DISK not found.
ERROR: Variable VIDEO not found.
ERROR: Variable BATTERY not found.
NOTE: The previous statement has been deleted.

WARNING: No variables specified for an SSCP matrix. Execution terminating.
NOTE: PROCEDURE REG used (Total process time):
real time 0.04 seconds
cpu time 0.04 seconds


708 proc print data = test;
709 Run;

NOTE: No variables in data set WORK.TEST.


Kind regards ,
markc
Regular Contributor
Posts: 165

Re: error in Log using the collinearity

You are missing something in your data step
N/A
Posts: 0

Re: error in Log using the collinearity

Hello ,

please help me . I'm getting an error in the code :-


data sales;
infile 'c:\Sas\sales.sas7bdat';
input Score Ghz Price Processor Memory Disk Video Battery;
proc reg simple corr;
model Score = Ghz Price Processor Memory Disk Video Battery / stb tol vif collin;
proc print data = sales;
run;

Error-

NOTE: Invalid data for Score in line 1 1-87.
NOTE: Invalid data for Ghz in line 1 89-97.
NOTE: Invalid data for Price in line 1 157-160.
NOTE: Invalid data for Processor in line 1 165-256.
NOTE: Invalid data for Memory in line 2 1-10.
NOTE: Invalid data for Disk in line 2 12-74.
NOTE: Invalid data for Video in line 2 76-78.
NOTE: Invalid data for Battery in line 2 80-88.
RULE: ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9--

2 CHAR .......... ...à...................ä...0.......´...0.......´...........rupt the executing pro
ZONE 00000000002000E0000000100000000000E00030000000B00030000000B000000000007777276626766776662776
NUMR 00026050000E00010000004E00C00000004C00010000004C00000001004C00000010002504048505853549E7002F

93 gram........................................................................................
ZONE 67662000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
NUMR 721DE000000000000000000000000000000000000000000000000000000000000000000000000000000000000000


RULE: ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9--

185 ........................................................................
ZONE 000000000000000000000000000000000000000000000000000000000000000000000000
NUMR 000000000000000000000000000000000000000000000000000000000000000000000000
NOTE: Invalid data errors for file ''c:\Cwa\sales.sas7bdat'' occurred outside the printed range.
NOTE: Increase available buffer lines with the INFILE n= option.
Score=. Ghz=. Price=. Processor=. Memory=. Disk=. Video=. Battery=. _ERROR_=1 _N_=1
NOTE: Invalid data for Score in line 3 1-256.
NOTE: Invalid data for Ghz in line 4 1-40.
NOTE: LOST CARD.
NOTE: Invalid data errors for file ''c:\Cwa\sales.sas7bdat'' occurred outside the printed range.
NOTE: Increase available buffer lines with the INFILE n= option.
Score=. Ghz=. Price=. Processor=. Memory=. Disk=. Video=. Battery=. _ERROR_=1 _N_=2
NOTE: 4 records were read from the infile 'c:\Cwa\sales.sas7bdat'.
The minimum record length was 40.
The maximum record length was 256.
One or more lines were truncated.
NOTE: SAS went to a new line when INPUT statement reached past the end of a line.
NOTE: The data set WORK.SALES has 1 observations and 8 variables.
NOTE: DATA statement used (Total process time):
real time 0.03 seconds
cpu time 0.04 seconds


18 proc reg simple corr;
19 model Score = Ghz Price Processor Memory Disk Video Battery / stb tol vif collin;

ERROR: No valid observations are found.


I had an excel file which i converted it to "laptop_review.sas" and then to "sales.sas7bdat".If I'm wrong somewhere please suggest me how to correct it as I've been trying for long to run the code.

Kind Regards ,
markc
Super Contributor
Super Contributor
Posts: 3,174

Re: error in Log using the collinearity

For some reason, you have decided to omit the key part of your SAS log - that is the DATA step logic used to read up your external data file. If you expect others to provide you feedback and guidance, you must share the entire SAS log by pasting the content in your forum post reply - not just the portion of the SAS program that is convenient or what you might believe is all that is relevant.

Also, your INFILE statement is referring to a SAS data file, not an external file. You would normally have a LIBNAME pointing to the file directory/folder and use a SET statement to input SAS data files -- not using an INFILE statement since this is not an external file.

And, do consider that you may have already started a related post here - http://support.sas.com/forums/thread.jspa?threadID=8824&tstart=0

Scott Barry
SBBWorks, Inc.

Message was edited by: sbb Message was edited by: sbb
N/A
Posts: 0

Re: error in Log using the collinearity

9 data sales;
30 infile 'c:\Sas\laptop_review.sas';
31 input Score Ghz Price Processor Memory Disk Video Battery;

NOTE: The infile 'c:\Cwa\laptop_review.sas' is:
Filename=c:\Cwa\laptop_review.sas,
RECFM=V,LRECL=256,File Size (bytes)=244,
Last Modified=27Feb2010:10:38:30,
Create Time=27Feb2010:10:38:30

NOTE: Invalid data for Score in line 1 1-4.
NOTE: Invalid data for Ghz in line 1 6-11.
NOTE: Invalid data for Price in line 1 13-16.
NOTE: Invalid data for Processor in line 1 18-32.
NOTE: Invalid data for Memory in line 2 13-21.
NOTE: Invalid data for Disk in line 2 23-48.
NOTE: Invalid data for Video in line 3 13-22.
NOTE: Invalid data for Battery in line 3 24-31.
RULE: ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9--
3 DBMS=EXCEL REPLACE; 31
NOTE: Invalid data errors for file ''c:\Cwa\laptop_review.sas'' occurred outside the printed range.
NOTE: Increase available buffer lines with the INFILE n= option.
Score=. Ghz=. Price=. Processor=. Memory=. Disk=. Video=. Battery=. _ERROR_=1 _N_=1
NOTE: Invalid data for Score in line 4 6-21.
NOTE: Invalid data for Ghz in line 5 6-18.
NOTE: Invalid data for Price in line 6 6-14.
NOTE: Invalid data for Processor in line 7 6-18.
NOTE: Invalid data for Memory in line 8 6-17.
NOTE: Invalid data for Disk in line 9 6-18.
NOTE: Invalid data for Video in line 10 1-4.
NOTE: LOST CARD.
NOTE: Invalid data errors for file ''c:\Cwa\laptop_review.sas'' occurred outside the printed range.
NOTE: Increase available buffer lines with the INFILE n= option.
Score=. Ghz=. Price=. Processor=. Memory=. Disk=. Video=. Battery=. _ERROR_=1 _N_=2
NOTE: 10 records were read from the infile 'c:\Cwa\laptop_review.sas'.
The minimum record length was 4.
The maximum record length was 49.
NOTE: SAS went to a new line when INPUT statement reached past the end of a line.
NOTE: The data set WORK.SALES has 1 observations and 8 variables.
NOTE: DATA statement used (Total process time):
real time 0.28 seconds
cpu time 0.01 seconds


32 proc reg simple corr;
33 model Score = Ghz Price Processor Memory Disk Video Battery / stb tol vif collin;
Super Contributor
Super Contributor
Posts: 3,174

Re: error in Log using the collinearity

If you review the SAS-generated log and the input record dump, it may be revealing...mostly because your INFILE statement is pointing (I believe) to your SAS program and not your input data. I have to wonder just how much time you are willing to invest to learn the SAS system and its programming facilities?

Suggest you start with analyzing your SAS DATA step and get your input data properly read up into a SAS file - then begin to consider using PROCs to analyze the data.


Scott Barry
SBBWorks, Inc.
Ask a Question
Discussion stats
  • 5 replies
  • 249 views
  • 0 likes
  • 3 in conversation