BookmarkSubscribeRSS Feed
talktorob
Calcite | Level 5

Greetings,

I am trying to estimate the means of a continuous outcome called 'sbpchangemed' at different levels of a categorical variable (called acescore with 5 levels) (exposure) at three different values of a continuous variable (called hsiscore).  I found the mean within each tertile of hsiscore. Tertile 1, low, has a mean of 2.0. Tertile 2, medium, has a mean of 10.3, and Tertile 3, high, has a mean of 29.5. 

I tried the following code but have received the enclosed error message. I have tried a couple of things with the syntax to no avail. 

 

Thank you so much for your help. Please let me know if I can help clarify anything.

 

 

proc regress data = Analyze filetype = sas design = wr ;
subpopn keep2 = 1 ; 
nest  strata2 psu2;
weight weight2;
 
class acescore female ethnic incgt30k1 hsedu married insurance1 engpref1 nativity ;
 
model sbpchangemed = acescore age1 followuptime2 female ethnic incgt30k1 hsedu married 
insurance1 engpref1 nativity bmi1 sbp1med hsiscore acescore*hsiscore ;
 
reflevel acescore = 0 ;
setenv decwidth = 2 ;
 
predmarg hsiscore / hsiscore = (2, 10.3, 29.5) ; 
 
pred_eff acescore = (-1 1 0 0 0) * hsiscore(2) / name = "1 vs 0 hsiscore =2";
pred_eff acescore = (-1 0 1 0 0) * hsiscore(2) / name = "2 vs 0 hsiscore =2";
pred_eff acescore = (-1 0 0 1 0) * hsiscore(2) / name = "3 vs 0 hsiscore =2";
pred_eff acescore = (-1 0 0 0 1) * hsiscore(2) / name = "4+ vs 0 hsiscore =2";
 
pred_eff acescore = (-1 1 0 0 0) * hsiscore(10.3) / name = "1 vs 0 hsiscore =10.3";
pred_eff acescore = (-1 0 1 0 0) * hsiscore(10.3) / name = "2 vs 0 hsiscore =10.3";
pred_eff acescore = (-1 0 0 1 0) * hsiscore(10.3) / name = "3 vs 0 hsiscore =10.3";
pred_eff acescore = (-1 0 0 0 1) * hsiscore(10.3) / name = "4+ vs 0 hsiscore =10.3";
 
pred_eff acescore = (-1 1 0 0 0) * hsiscore(29.5) / name = "1 vs 0 hsiscore = 29.5";
pred_eff acescore = (-1 0 1 0 0) * hsiscore(29.5) / name = "2 vs 0 hsiscore = 29.5";
pred_eff acescore = (-1 0 0 1 0) * hsiscore(29.5) / name = "3 vs 0 hsiscore = 29.5";
pred_eff acescore = (-1 0 0 0 1) * hsiscore(29.5) / name = "4+ vs 0 hsiscore = 29.5";
 
run;
 

Table 3 error message.jpg

 

Table 3 screenshot.jpg

 

8 REPLIES 8
PaigeMiller
Diamond | Level 26

When there are errors in the log, please show us the ENTIRE log (every single line, every single character, with nothing removed) for this PROC. Please copy the log as text and paste it into the window that appears when you click on the </> icon.

 

2021-11-26 08_27_29-Reply to Message - SAS Support Communities — Mozilla Firefox.png

 

--
Paige Miller
talktorob
Calcite | Level 5
Opened SAS data file ANALYZE for reading.

NOTE: Terms in the MODEL statement have been rearranged
      to follow SUBGROUP/CLASS order.

NOTE: PROCEDURE REGRESS used (Total process time):
      real time           0.62 seconds
      cpu time            0.61 seconds


101
102
103  proc regress data = Analyze filetype = sas design = wr ;
104  subpopn keep2 = 1 ;
105      nest  strata2 psu2;
106      weight weight2;
107
108  class acescore female ethnic incgt30k1 hsedu married insurance1 engpref1 nativity ;
109
110  model sbpchangemed = acescore age1 followuptime2 female ethnic incgt30k1 hsedu married
111              insurance1 engpref1 nativity bmi1 sbp1med hsiscore acescore*hsiscore ;
112
113  reflevel acescore = 0 ;
114  setenv decwidth = 2 ;
115
116
117
118  pred_eff acescore = (-1 1 0 0 0) * hsiscore(2) / name = "1 vs 0 hsiscore =2";
119  pred_eff acescore = (-1 0 1 0 0) * hsiscore(2) / name = "2 vs 0 hsiscore =2";
120  pred_eff acescore = (-1 0 0 1 0) * hsiscore(2) / name = "3 vs 0 hsiscore =2";
121  pred_eff acescore = (-1 0 0 0 1) * hsiscore(2) / name = "4+ vs 0 hsiscore =2";
122
123  pred_eff acescore = (-1 1 0 0 0) * hsiscore(10.3) / name = "1 vs 0 hsiscore =10.3";
124  pred_eff acescore = (-1 0 1 0 0) * hsiscore(10.3) / name = "2 vs 0 hsiscore =10.3";
125  pred_eff acescore = (-1 0 0 1 0) * hsiscore(10.3) / name = "3 vs 0 hsiscore =10.3";
126  pred_eff acescore = (-1 0 0 0 1) * hsiscore(10.3) / name = "4+ vs 0 hsiscore =10.3";
127
128  pred_eff acescore = (-1 1 0 0 0) * hsiscore(29.5) / name = "1 vs 0 hsiscore = 29.5";
129  pred_eff acescore = (-1 0 1 0 0) * hsiscore(29.5) / name = "2 vs 0 hsiscore = 29.5";
130  pred_eff acescore = (-1 0 0 1 0) * hsiscore(29.5) / name = "3 vs 0 hsiscore = 29.5";
131  pred_eff acescore = (-1 0 0 0 1) * hsiscore(29.5) / name = "4+ vs 0 hsiscore = 29.5";
132
133
134  run;


9   PRED_EFF ACESCORE = (-1 1 0 0 0) * HSISCORE(2) / NAME = "1 vs 0 hsiscore =2";

SYNTAX ERROR
 in Statement 9
:

(Message 303)
Expected '/' to precede option list
10  PRED_EFF ACESCORE = (-1 0 1 0 0) * HSISCORE(2) / NAME = "2 vs 0 hsiscore =2";

SYNTAX ERROR
 in Statement 10
:

(Message 303)
Expected '/' to precede option list
11  PRED_EFF ACESCORE = (-1 0 0 1 0) * HSISCORE(2) / NAME = "3 vs 0 hsiscore =2";

SYNTAX ERROR
 in Statement 11
:

(Message 303)
Expected '/' to precede option list
12  PRED_EFF ACESCORE = (-1 0 0 0 1) * HSISCORE(2) / NAME = "4+ vs 0 hsiscore =2";

SYNTAX ERROR
 in Statement 12
:

(Message 303)
Expected '/' to precede option list
13  PRED_EFF ACESCORE = (-1 1 0 0 0) * HSISCORE(10.3) / NAME = "1 vs 0 hsiscore =10.3";

SYNTAX ERROR
 in Statement 13
:

(Message 303)
Expected '/' to precede option list
14  PRED_EFF ACESCORE = (-1 0 1 0 0) * HSISCORE(10.3) / NAME = "2 vs 0 hsiscore =10.3";

SYNTAX ERROR
 in Statement 14
:

(Message 303)
Expected '/' to precede option list
15  PRED_EFF ACESCORE = (-1 0 0 1 0) * HSISCORE(10.3) / NAME = "3 vs 0 hsiscore =10.3";

SYNTAX ERROR
 in Statement 15
:

(Message 303)
Expected '/' to precede option list
16  PRED_EFF ACESCORE = (-1 0 0 0 1) * HSISCORE(10.3) / NAME = "4+ vs 0 hsiscore =10.3";

SYNTAX ERROR
 in Statement 16
:

(Message 303)
Expected '/' to precede option list
17  PRED_EFF ACESCORE = (-1 1 0 0 0) * HSISCORE(29.5) / NAME = "1 vs 0 hsiscore = 29.5";

SYNTAX ERROR
 in Statement 17
:

(Message 303)
Expected '/' to precede option list
18  PRED_EFF ACESCORE = (-1 0 1 0 0) * HSISCORE(29.5) / NAME = "2 vs 0 hsiscore = 29.5";

SYNTAX ERROR
 in Statement 18
:

(Message 303)
Expected '/' to precede option list
19  PRED_EFF ACESCORE = (-1 0 0 1 0) * HSISCORE(29.5) / NAME = "3 vs 0 hsiscore = 29.5";

SYNTAX ERROR
 in Statement 19
:

(Message 303)
Expected '/' to precede option list
20  PRED_EFF ACESCORE = (-1 0 0 0 1) * HSISCORE(29.5) / NAME = "4+ vs 0 hsiscore = 29.5";

SYNTAX ERROR
 in Statement 20
:

(Message 303)
Expected '/' to precede option list

talktorob
Calcite | Level 5
Apologies for omitting. The log shows the same error message repeated several times
PaigeMiller
Diamond | Level 26

What version of SAS (what version NUMBER) and what interface (Viya, Studio, Base SAS, etc.) are you running? I find no evidence of a PROC REGRESS in SAS.

--
Paige Miller
talktorob
Calcite | Level 5

I am using SAS-Callable SUDAAN 11.0.4

PaigeMiller
Diamond | Level 26

I don't know who can answer SUDAAN questions here, I certainly can't. But you might want to go back to your original post and enter SUDAAN into the title. This type of information should not be omitted, and is best placed right at the beginning.

--
Paige Miller
talktorob
Calcite | Level 5

Is there an equivalent procedure in SAS that can perform the same function? I think this might be an 'estimate' statement. 

PaigeMiller
Diamond | Level 26

PROC GLM

PROC GLIMMIX

--
Paige Miller

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!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 8 replies
  • 511 views
  • 0 likes
  • 2 in conversation