Need help with some SAS coding

Reply
Frequent Learner
Posts: 1

Need help with some SAS coding

 
1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
55
56 proc reg data=adnanlib.crime;
NOTE: Data file ADNANLIB.CRIME.DATA is in a format that is native to another host, or the file encoding does not match the session
encoding. Cross Environment Data Access will be used, which might require additional CPU resources and might reduce
performance.
57 model crime=pctmetro poverty single;
58 output out=crime1res(keep=crime pctmetro poverty single r lev cd diffit)
59 r=rstudent h=lev cd=cookd dffits=dffit;
_
22
76
NOTE: The previous statement has been deleted.
ERROR 22-322: Syntax error, expecting one of the following: COOKD, COVRATIO, DFFITS, H, L95, L95M, LCL, LCLM, OUT, P, PRED,
PREDICTED, PRESS, R, RESIDUAL, RSTUDENT, STDI, STDP, STDR, STUDENT, U95, U95M, UCL, UCLM.
ERROR 76-322: Syntax error, statement will be ignored.
60 run;
 
60 !
61
62 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
WARNING: Data set WORK.CRIME1RES was not replaced because new file is incomplete.
74
Contributor
Posts: 62

Re: Need help with some SAS coding

You can use PROC CONTENTS to view the file and see what is the problem. It might be best to "convert" the file in a DATA step to a SAS file.

 

See http://support.sas.com/documentation/cdl/en/movefile/59598/HTML/default/viewer.htm#a001003262.htm

 

Norman.

Norman.
SAS 9.4 (TS1M0) X64_7PRO WIN 6.1.7601 Service Pack 1 Workstation

Valued Guide
Posts: 3,208

Re: Need help with some SAS coding

The foreign message is telling that the SAS dataset is converted to a native one while processing.
You are having either a binary copy of a different SAS system or some old SAS version.   
That one doesn't  hurt you now...

The error is telling you codes the proc reg  pacjage wrong. RE-check it very detailed and look where the underscore is pointing http://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_reg_syntax01...
look at the output statement I cannot find it in the syntax the way you have coded

---->-- ja karman --<-----
Super User
Posts: 17,912

Re: Need help with some SAS coding

In Proc Reg, CD is not a valid option. Also, double check your KEEP statement, the last variable looks to be misspelled.
Ask a Question
Discussion stats
  • 3 replies
  • 278 views
  • 1 like
  • 4 in conversation