BookmarkSubscribeRSS Feed
rnickcochan
Calcite | Level 5

Hey - I am trying to run a mixed model in SAS Univeristy Edition to identify the significance of a 3 way interaction between agency (continuous), endorsement type (etype, categorical), and endorsement degree (edegree). PPCdir (directional change of personality) is the DV. Here is my code:

 

proc mixed data=H3long;
class etype;
model ppcdir= agency| etype| edegree;
repeated / type=cs sub=part;
run;

 

This gives me: WARNING: Stopped because of too many likelihood evaluations.

 

I tried adding maxiter=1000 maxfunc=5000 to the proc line but then it just says: WARNING: Did not converge.

 

Any ideas on what is going on, and what I need to do to fix the model?

 

Thanks!

 

 

5 REPLIES 5
PGStats
Opal | Level 21

There are no interaction terms in your model. Are you sure you want to cross agency and edegree as continuous variables?

PG
rnickcochan
Calcite | Level 5

Hey PG, 

 

The | (bar) typically runs the model and gives me main effects and interactions. Is this not correct this time? 

 

Secondly, I thought you could cross 2 continuous variables. In this case I do want to do it (or atleast try) bc the 3 way interaction is a key component of one of my hypotheses. 

 

I am still having the same issues as above. 

 

I also ran it as a GLIMMIX but the issue now are t values that are infty. 

 

Any advice?

PaigeMiller
Diamond | Level 26

Your code is fine, as far as that goes. Algorithms not converging are usually data problems, or model overspecification.

 

How many levels of the categorical variable edegree? How many subjects?

 

PROC MIXED is an iterative procedure, it tries to converge to a solution, but there is no guarantee that it will converge. When it can't converge, the reasons are usually (but not always):

  • sparse data (for example if edegree had 1000 levels, or too many subjects)
  • model overspecification
  • outliers or clusters
  • almost no slopes anywhere
  • wrong METHOD= option
--
Paige Miller
rnickcochan
Calcite | Level 5

Hey Paige - thanks for the reply. Here is some extra info about variables. 

 

N = 319 participants 

 

Agency - continuous, between subjects 

Etype - categorical, within subjects (2 levels, volitional or situational) 

Edegree - continuous, within subjects 

PPCDir (change) - DV

 

Etype and edegree are related. Participants rated (edgree on 1-5 likert scale)  how much they agreed that volitional strategies (etype = v) AND situational strategies (etype = S) helped them change. 

 

Agency is also 1-5 likert scale

 

PPCDIR is a difference score between past and current rated personality. PPabs which you will see on the data is another DV I want to run the model with (absolute change).

 

Attached is my data in case that helps you! 

 

Thank so much for the help. 

 

PaigeMiller
Diamond | Level 26

@rnickcochan wrote:

 

N = 319 participants 

 

Agency - continuous, between subjects 

Etype - categorical, within subjects (2 levels, volitional or situational) 

Edegree - continuous, within subjects 

PPCDir (change) - DV

 

Etype and edegree are related. Participants rated (edgree on 1-5 likert scale)  how much they agreed that volitional strategies (etype = v) AND situational strategies (etype = S) helped them change. 

 

Agency is also 1-5 likert scale

 

PPCDIR is a difference score between past and current rated personality. PPabs which you will see on the data is another DV I want to run the model with (absolute change).

 

Attached is my data in case that helps you! 

 


Honestly, I never download (and many people never download) Microsoft Office files as they can be security risks. Nor do I see any reason to run your model on your data and get the same results that you have. However, I do have suggestions for you to try.

 

I suspect that having 319 different subjects, and you are looking for a three way interaction, makes the data very sparse, and you may be having problems because of that. I realize that your goal is to determine the significance of the 3-way interaction; nevertheless some things cannot be estimated from certain types of data, and as an experiment I recommend you try fitting the model without the three way interaction to see if the solution converges.

 

I am also confused by "continuous within subjects" for edegree, as I am not sure I have ever seen a continuous variable "within subjects", but my experience in this area is limited and maybe it does exist. Continuous, across subjects, makes more sense to me. I also don't see in your code how you have specified this "continuous within subjects" in the model.

--
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!

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
  • 5 replies
  • 807 views
  • 0 likes
  • 3 in conversation