Hello,
I'm new to this forum & new to SAS.
Somebody wrote me a procedure, but I do not get it to work.
It tells me, it cannot find the dataset.
Can you help me out?
Procedure:
/*
proc print data=wc.gi_det_total (obs=5);
run;
*/
data wc.wcwork;
set wc.gi_det_total (keep = hs_01 ap_06 nu_01 nu_02 et03 hc_04 hc_0201 hc_0202);
if ap_06 = 1 then pa1 = 1;else pa1 = 0;
if ap_06 = 2 then pa2 = 1;else pa2 = 0;
if nu_01 = 1 then wc1 = 1;else wc1 = 0;
if nu_01 = 2 then wc2 = 1;else wc2 = 0;
if nu_02 = 1 then bmi1 = 1;else bmi1 = 0;
if nu_02 = 2 then bmi2 = 1;else bmi2 = 0;
if nu_02 = 3 then bmi3 = 1;else bmi3 = 0;
if nu_02 in(1,2) then bmi = 1;
if nu_02 in(3,4) then bmi = 0;
bmiwc = bmi * nu_01;
bmiwc1 = bmi * wc1;
bmiwc2 = bmi * wc2;
run;
proc logistic data=wc.wcwork;
model hs_01 = ap_06 nu_01 nu_02 et03 hc_04 hc_0201 / rsq;
run;
Errors:
NOTE: SAS initialization used:
real time 1.71 seconds
cpu time 1.45 seconds
1 libname wc 'c:\temp';
NOTE: Libref WC was successfully assigned as follows:
Engine: V9
Physical Name: c:\temp
2 /*
3 proc print data=wc.gi_det_total (obs=5);
4 run;
5 */
6 data wc.wcwork;
7 set wc.gi_det_total (keep = hs_01 ap_06 nu_01 nu_02 et03 hc_04 hc_0201 hc_0202);
ERROR: File WC.GI_DET_TOTAL.DATA does not exist.
8 if ap_06 = 1 then pa1 = 1;else pa1 = 0;
9 if ap_06 = 2 then pa2 = 1;else pa2 = 0;
10 if nu_01 = 1 then wc1 = 1;else wc1 = 0;
11 if nu_01 = 2 then wc2 = 1;else wc2 = 0;
12 if nu_02 = 1 then bmi1 = 1;else bmi1 = 0;
13 if nu_02 = 2 then bmi2 = 1;else bmi2 = 0;
14 if nu_02 = 3 then bmi3 = 1;else bmi3 = 0;
15 if nu_02 in(1,2) then bmi = 1;
16 if nu_02 in(3,4) then bmi = 0;
17 bmiwc = bmi * nu_01;
18 bmiwc1 = bmi * wc1;
19 bmiwc2 = bmi * wc2;
20 run;
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WC.WCWORK may be incomplete. When this step was stopped there were 0
observations and 14 variables.
WARNING: Data set WC.WCWORK was not replaced because this step was stopped.
NOTE: DATA statement used (Total process time):
real time 0.07 seconds
cpu time 0.06 seconds
21
NOTE: PROCEDURE LOGISTIC used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
Can someone explain me what to do?
Thanks in Advance!
Phi