BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Maha-Albqoor
Fluorite | Level 6

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,

 

1 ACCEPTED SOLUTION

Accepted Solutions
art297
Opal | Level 21

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

View solution in original post

2 REPLIES 2
art297
Opal | Level 21

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

Maha-Albqoor
Fluorite | Level 6

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.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 743 views
  • 0 likes
  • 2 in conversation