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

Hello and thank you for your willingness to help! I am analyzing a complex survey with a dichotomous outcome, categorical covariates, and continuous predictors of interest. I have three groups of people which I am comparing the computed ORs and 95% CIs between and specifically, I want to see the ORs and 95% CIs for a 10-unit change in the continuous predictors.

 

Here is a breakdown of my variables:

biling2 = a three level categorical variable of the three groups I wish to compare (english speaking, spanish speaking, bilingual)

policy_score, shs_score, harm_score, product_score = continuous predictors of interest from 1 to 100 which I wish to view as a 10-unit change rather than a single-unit change.

 

Here is the code I am attempting to run in SAS 9.4:

proc surveylogistic data=data1;
	weight	weight2;
	class	age3c (ref='18 to 29') female poverty ppeducat / param=ref;
	model 	anytobacco (event='1') = age3c female poverty ppeducat policy_score shs_score harm_score product_score / clodds=wald;
	domain 	biling2;
	format 	biling2 bilingf. age3c age3cf. ppeducat ppeducatf.;
	units 	policy_score = 10 shs_score = 10 harm_score = 10 product_score = 10;
run;

I get the following:

Error 73-322: Expecting an OFFSET.

Error: Variable WALD not found

 

When I remove the =wald from the clodds statement the code runs fine, but then my OR is not centered in the 95% CIs that are output. I'm unsure what is going on and any help you can provide would be greatly appreciated! I tried to include enough information, but also not overburden the post. If you need more info I am more than happy to provide it! 

 

Thanks again!

1 ACCEPTED SOLUTION

Accepted Solutions
FreelanceReinh
Jade | Level 19

Hello @morgbri,

 

According to the documentation the option is just CLODDS. There are no suboptions of the form "CLODDS=type-of-CI." This is the reason for the error messages you got.

 

The reason why your "OR is not centered in the 95% CIs" can be found in section Odds Ratio Estimation of the documentation. There it says: "Confidence intervals for the odds ratios are obtained by exponentiating the corresponding confidence intervals for the log odd ratios." So, the logarithm of the odds ratio estimate should be centered between the logarithms of the lower and upper confidence limit. See Output 114.1.5 in example 114.1 Stratified Cluster Sampling where exactly this is the case.

 

 

View solution in original post

4 REPLIES 4
ChrisNZ
Tourmaline | Level 20

Error: Variable WALD not found

is pretty clear isn't it?

You try to use a variable that does not exist.

morgbri
Calcite | Level 5

Wald is not a variable, it's a type of confidence interval calculation. It's one of the options for calculating confidence limits for your odds ratios - wald or profile likelihood.

FreelanceReinh
Jade | Level 19

Hello @morgbri,

 

According to the documentation the option is just CLODDS. There are no suboptions of the form "CLODDS=type-of-CI." This is the reason for the error messages you got.

 

The reason why your "OR is not centered in the 95% CIs" can be found in section Odds Ratio Estimation of the documentation. There it says: "Confidence intervals for the odds ratios are obtained by exponentiating the corresponding confidence intervals for the log odd ratios." So, the logarithm of the odds ratio estimate should be centered between the logarithms of the lower and upper confidence limit. See Output 114.1.5 in example 114.1 Stratified Cluster Sampling where exactly this is the case.

 

 

morgbri
Calcite | Level 5

Thank you, @FreelanceReinh! I was looking at the documentation, but must have been on a different page because I saw the two options (pl or wald) still listed. This is very helpful!

 

I know asymmetric confidence intervals are usually a byproduct of transformations, but thought it was weird my OR was centered in the CI for a one-unit increase in odds, but then not for the ten-unit increase calculation. I look more closely at the page you linked. 

 

Again, thank you for the insight/info!

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 2060 views
  • 0 likes
  • 3 in conversation