I am trying to compare two models where the smaller one is what I hypothesize to be the best model, and then the larger one is the complete model with all variables. I would like to use the "test statement" in proc logistic to compare the models to determine if any of the additional variables might potentially be significant. The problem is that test does not seem to be recognizing my categorical variable (d) as shown below:
proc logistic data = test;
class d (param = ref ref = '0');
model y (event = '1') = a b c d;
test1: test c=d=0;
run;
This is the image of the error showing in the log
So essentially I am testing to see if it is possible that either c or d could be significant predictors in the model.
Also, I'm not sure if I am using the "test statement" correctly, so any advice on that would be appreciated.
The following is test data you can use:
data test (drop=i);
do i=1 to 1000;
a=round(uniform(1)*4,.01);
b=round(uniform(1)*10,.01);
c=round(uniform(1)*7.5,.01);
if b<5 then d=1;
else d=0;
output;
end;
stop;
run;
Aucun commentaire:
Enregistrer un commentaire