BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
UserID437122
Fluorite | Level 6

I'm using Proc surveylogistic to run trend analyses with three years of weighted data (code below). I've included my linear variable along with other variables to control for.  I've added a contrast line to the code but I'm getting the following error message:  NOTE: Convergence criterion (GCONV=1E-8) satisfied. WARNING: More coefficients than levels specified for effect datayr.  Some coefficients will be ignored. 

 

The results show that the three years of data are included although the warning statement says otherwise. I had been looking at the 'Contrast Test Results' p value. Should I keep the contrast line? Should I instead be using the p-values from the Type 3 Analysis of Effects?

 

proc surveylogistic data=combined1721;
strata stratum;
cluster psu;
weight weight;
class forced_sex datayr female RACEETH4cat grade ;
model forced_sex = datayr female RACEETH4cat grade ;
contrast 'linear' datayr -1 0 1;
format RACEETH4cat RACEETH4cat. forced_sex forced_sex.;
run;

1 ACCEPTED SOLUTION

Accepted Solutions
SAS_Rob
SAS Employee

Assuming you are trying to test the linear effect using orthogonal polynomials, it is usually easier to set the PARAM= option on the CLASS statement to GLM to make sure that the coefficients match up correctly with the levels.  This will also take care of the WARNING message in your case.

 

class datayr female RACEETH4cat grade/param=glm;

 

note that I removed the response variable from the CLASS statement since it is not needed.

View solution in original post

2 REPLIES 2
SAS_Rob
SAS Employee

Assuming you are trying to test the linear effect using orthogonal polynomials, it is usually easier to set the PARAM= option on the CLASS statement to GLM to make sure that the coefficients match up correctly with the levels.  This will also take care of the WARNING message in your case.

 

class datayr female RACEETH4cat grade/param=glm;

 

note that I removed the response variable from the CLASS statement since it is not needed.

UserID437122
Fluorite | Level 6

That worked, thank you!

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 625 views
  • 4 likes
  • 2 in conversation