BookmarkSubscribeRSS Feed
Sherylin
Calcite | Level 5

Hi everyone,

 

I tried to run proc mixed with several random effects, and used KR method to correct df.  In my study, I presented a set of stimuli (words) to each participant and varied two features of these stimuli. I've set up two random effects (subjects and stimuli), since the stimuli were in fact crossed with participants. In addition, the presentation order of stimuli for each participant was recorded and named 'trial'. 

 

I've tried different ways to run this script, but the den df in the output did not seem to be corrected (den df = the number of trials * the number of subjects).  The code is attached below.  Your help is greatly appreciated! Thank you!

 

proc mixed data=dataset1 covtest noclprint namelen=100 ic method=ml;

class subject targetword;

model rt = condition|feature1|feature2 trial /ddfm=KR solution;

random int trial / subject=subject Type=un;

random int/ subject=targetword Type=un;

run;

1 REPLY 1
lvm
Rhodochrosite | Level 12 lvm
Rhodochrosite | Level 12

KR can sometimes give unusual results, especially if you have an overparameterized model (in this case, you could get ddf=1, which is really a warning of a problem), or if you have a lot of 0s for the estimated variances and covariances (where you could get somethihg like the residual df). You have several terms in your model, and I don't know which tests are giving you the "surprising" ddf calculation. I can't really comment too much on the appropriateness of your model (I can't really study the experimental layout). It is possible that the output is appropriate given your design and parameter estimates.

 

You should try ddfm=kr(firstorder) to see if this has an effect on the results. I am guessing not (because of the UN structure), but try this. I think you will probably need a less complex var-cov structure. Start with type=cs and work up to more complicated versions, keeping track of AIC.

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
  • 1 reply
  • 1431 views
  • 0 likes
  • 2 in conversation