Hi all, I have a list of multiple independent variables. I want to run a logistic regression model of each independent variable against an dependent variable and the same process should be repeated for each independent variable against the same target variable and the output statistics should be saved in a dataset. I am using SAS Viya 3.5 version. However, while running the code mentioned in the last, it is showing the following error. ERROR: The %DO statement is not valid in open code. ERROR: The %end statement is not valid in open code. Is there any other way through which I can get the similar output? Thanks. %let dependent_variable = Cholesterol_Status; %let independent_variables = AgeAtStart Smoking_Status; %let variable_list = %scan(&independent_variables, 1); %let i = 1; %do %while (%length(%scan(&independent_variables, &i)) > 0); %let current_variable = %scan(&independent_variables, &i); proc logistic data=mycaslib.mydata; model &dependent_variable = ¤t_variable; score data=mycaslib.mydata out=out_rstore; run; %let i = %eval(&i + 1); %end;
... View more