Hi I have been trying to find why the follwoing SAS code showed a syntax error statement and the program did not process the procedure.
proc surveyfreq data=file name you have;
tables (first domain variable * second domain variable) * (categorical variables)/chisq CL list missing;
strata strat variable;
cluster psu variab;e;
weight weighting variable;
TITLE ‘descriptive characteristics of two sub-samples (the two domain variables)’
run;
Any thoughts please?
Thank you,
Hard to say without seeing the actual code you ran and not seeing it in a box that you insert by clicking on the {i} icon.
From the code that you showed us the first thing that stands out are the odd single quotes around the title. Change them to regular quotes, make sure you insert a semi-colon at the end of the statement, and it might run as expected.
I presume that where you showedfirst domain variable, second etc., strat variable, psu variable and weighting variable, you actually had real variable names. If not, that would also be why it wouldn't run (besides the fact that psu variab;e; would DEFINITELY cause an error.
Art, CEO, AnalystFinder.com
Hard to say without seeing the actual code you ran and not seeing it in a box that you insert by clicking on the {i} icon.
From the code that you showed us the first thing that stands out are the odd single quotes around the title. Change them to regular quotes, make sure you insert a semi-colon at the end of the statement, and it might run as expected.
I presume that where you showedfirst domain variable, second etc., strat variable, psu variable and weighting variable, you actually had real variable names. If not, that would also be why it wouldn't run (besides the fact that psu variab;e; would DEFINITELY cause an error.
Art, CEO, AnalystFinder.com
Thank you so much. Unfortuantely I still cannot access the dataset or get the SASlog, I sent this code to analysts who have the access and they just told me they got errors!
yes there are actual names of the variables
Thank you for the quick help.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.