BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
joachimg
Obsidian | Level 7

I'm getting an error when I try to run a proc surveylogistic. I'm think it has to do with the / clparm I added, but it could be something else. Code and log below. Thanks so much!    Edit: playing around with the code, and I don't think it's the clparm. again any help is much appreciated 

 

/*b2*/
/*vaxxed*/
proc surveylogistic data=masks1;
where waveno GE 6;
weight wt_multi;
class d_age_cat2 (ref="0") d_gender (ref="MALE") d_race (ref="NH White") d_politics (ref="DEM") d_religion2(ref="NOTHING") vaxxed(ref="0") d_hcw (ref="0") d_chronic (ref="0") waveno(ref="6");
model b2_m_always (event=”1”) = waveno d_age_cat2 d_gender d_race d_politics d_religion2 vaxxed d_hcw d_chronic / clparm;
run;
103        
 104        /*b2*/
 105        /*vaxxed*/
 106        proc surveylogistic data=masks1;
 NOTE: PROCEDURE SURVEYLOGISTIC used (Total process time):
       real time           0.00 seconds
       user cpu time       0.00 seconds
       system cpu time     0.00 seconds
       memory              2100.50k
       OS Memory           27816.00k
       Timestamp           09/13/2021 08:58:27 PM
       Step Count                        26  Switch Count  0
       Page Faults                       0
       Page Reclaims                     396
       Page Swaps                        0
       Voluntary Context Switches        0
       Involuntary Context Switches      0
       Block Input Operations            0
       Block Output Operations           8
       
 NOTE: The SAS System stopped processing this step because of errors.
 107        where waveno GE 6;
 108        weight wt_multi;
 109        class d_age_cat2 (ref="0") d_gender (ref="MALE") d_race (ref="NH White") d_politics (ref="DEM")
 109      ! d_religion2(ref="NOTHING") vaxxed(ref="0") d_hcw (ref="0") d_chronic (ref="0") waveno(ref="6");
 110        model b2_m_always (event=”1”) = waveno d_age_cat2 d_gender d_race d_politics d_religion2 vaxxed d_hcw d_chronic /
                                     _______
                                     22
                                     202
 110      ! clparm;
 ERROR 22-322: Syntax error, expecting one of the following: a quoted string, FIRST, LAST.  
 ERROR 202-322: The option or parameter is not recognized and will be ignored.
 111        run;
 112        
 113        
 114        OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 124        

 

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User
Actually the error is in the quotes, you copied and pasted it from somewhere?
You need to retype the quotes, they're pretty curly quotes that SAS doesn't know how to interpret, just retyping the code will fix that.

Note how this looks compared to the one in your editor:
model b2_m_always (event=”1”)

FYI - if you had not pasted your code in a code box this would have been a PITA to find.

View solution in original post

2 REPLIES 2
Reeza
Super User
Actually the error is in the quotes, you copied and pasted it from somewhere?
You need to retype the quotes, they're pretty curly quotes that SAS doesn't know how to interpret, just retyping the code will fix that.

Note how this looks compared to the one in your editor:
model b2_m_always (event=”1”)

FYI - if you had not pasted your code in a code box this would have been a PITA to find.
joachimg
Obsidian | Level 7

Ahhh I see it! I did copy and paste from another doc, so I went through and fixed all of the quotes....except for that one!! Thank you so much. I knew it was going to be staring me in the face. xD

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 405 views
  • 2 likes
  • 2 in conversation