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

Hi everyone, I am using Proc Surveylogistic on SAS 9.4 and having trouble with my SAS model converging and wondering how to address this. I've tried all of the ridging options and increased the max iterations. SAS suggests using HALFMAX and INEST, but I cannot find any information on these options. Here is the warning message:

 

WARNING: The linesearch technique has failed to improve the loglikelihood. You may want to increase
        the maximum number of step halvings (HALFMAX= option), or switch to use a ridging
        technique (RIDGING= option), or specify a new set of parameter estimates (INEST= option).
WARNING: The SURVEYLOGISTIC procedure continues in spite of the above warning. Results shown are
        based on the last maximum likelihood iteration. Validity of the model fit is questionable.

 

Can someone direct me to where I can find information on HALFMAX or INEST? Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions
ChrisHemedinger
Community Manager

The INEST data has to be in a certain format with required var names and a TYPE, so if you decide to pursue that approach -- here's an example (which I lifted from a SAS Tech Support example).

 

data in_parms(type=parms);
input _TYPE_$1-5 _NAME_ $7-16 Intercept x1;
datalines;
PARMS y          1.78602 -1.92822
COV   Intercept  0.02480 -0.03560
COV   x1        -0.03560 0.06408  
;
run;

proc surveylogistic data=test inest=in_parms;
/* your model, class, and other statements */
run;  
It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.

View solution in original post

6 REPLIES 6
Rick_SAS
SAS Super FREQ

The INEST= option enables you to specify a data set that has initial values for parameter estimates.  Better guesses sometimes help convergence.

 

I don't know what "HALFMAX" means, and either did Google. My guess is that the WARNING message was initially written for another function or procedure (maybe in SAS/OR) that has or had such an option.  Since it doesn't seem to apply to SURVEYLOGISTIC, you can ignore it.

 

Warnings like this often occur when the model does not fit the data.. Try simplifying the model, maybe by reducing the number of terms and/or interactions.

ChrisHemedinger
Community Manager

The INEST data has to be in a certain format with required var names and a TYPE, so if you decide to pursue that approach -- here's an example (which I lifted from a SAS Tech Support example).

 

data in_parms(type=parms);
input _TYPE_$1-5 _NAME_ $7-16 Intercept x1;
datalines;
PARMS y          1.78602 -1.92822
COV   Intercept  0.02480 -0.03560
COV   x1        -0.03560 0.06408  
;
run;

proc surveylogistic data=test inest=in_parms;
/* your model, class, and other statements */
run;  
It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
jt14
Fluorite | Level 6

Thank you both! INEST worked very well.

ChrisHemedinger
Community Manager

Great! Will fist bump @Rick_SAS when I next see him.  He deserves the credit -- I'm a "stats proc poser" who can copy/paste from tech support samples.

 

Thanks for checking out the communities, @jt14!

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
RazanAm
Calcite | Level 5

Hello there,

I am having a very similar problem. Note: proc logistics works fine, it is when I run the bootstrapped weights that I run into a problem.

What does the INEST option mean? what can be the solution for me?

Thank you for your help.

Razan

 

 

Below is my syntax: 

 

Proc surveylogistic data=boot.merged_1  varmethod=BRR ;

class ADHR (ref=first) DHH_SEX (ref=first)  year(ref=first) agegrp (ref=first) edu_lv (ref=first) ;

model adhr = DHH_SEX year agegrp edu_lv /   RIDGING=NONE ;

repweights bsw1 - bsw500 ;

weight fwgt ;

run;

 

 

NOTE: PROC SURVEYLOGISTIC is modeling the probability that adhr=1.

NOTE: Convergence criterion (GCONV=1E-8) satisfied.

WARNING: The linesearch technique has failed to improve the loglikelihood. You may want to

         increase the maximum number of step halvings (HALFMAX= option), or switch to use a

         ridging technique (RIDGING= option), or specify a new set of parameter estimates (INEST=

         option).

WARNING: The SURVEYLOGISTIC procedure continues in spite of the above warning. Results shown are

         based on the last maximum likelihood iteration. Validity of the model fit is

         questionable.

NOTE: PROCEDURE SURVEYLOGISTIC used (Total process time):

      real time           3:00.49

      cpu time            2:15.08

 

 

 

jt14
Fluorite | Level 6

I used proc logistic to output a dataset containing initial parameter estimates using OUTEST that I then applied to the proc surveylogistic version of the model using INEST. These parameter estimates served as a starting point for the model convergence. 

 

If you have already exhausted all of the ridging options, I would try:

 

Proc logistic data=boot.merged_1  OUTEST=XXXX;

class ADHR (ref=first) DHH_SEX (ref=first)  year(ref=first) agegrp (ref=first) edu_lv (ref=first) ;

model adhr = DHH_SEX year agegrp edu_lv /   PARAM=REF ;

run;

 

Proc surveylogistic data=boot.merged_1  varmethod=BRR INEST=XXXX ;

class ADHR (ref=first) DHH_SEX (ref=first)  year(ref=first) agegrp (ref=first) edu_lv (ref=first) ;

model adhr = DHH_SEX year agegrp edu_lv /   PARAM=REF ;

repweights bsw1 - bsw500 ;

weight fwgt ;

run;

 

The variables from the OUTEST dataset must match the number of variables and the variable names that PROC SURVEYLOGISTIC is expecting from your inputted INEST dataset. If you have a similar model that did converge in PROC SURVEYLOGISTIC, you can use that to investigate what variables are needed. I hope this works. I am far from an expert on this and it may have been luck that this was a quick fix for me.

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 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
  • 6 replies
  • 7146 views
  • 12 likes
  • 4 in conversation