Solved
New Contributor
Posts: 2

# Is it possible to specify 3 repeated factors in Proc Mixed?

I'm trying to specify three repeated factors in Proc Mixed.  I'm able to specify one or two repeated factors depending on the covariance structure specified in the Repeated statement.  (Two repeated factors seems to require Type=un@cs or Type=un@un.)  However, I've had no success with three repeated factors.  Is it a matter of specifying the appropriate covariance structure, or does Proc Mixed not handle more than 2 repeated factors?

Below is the code I'm running.  The data is stacked as it should be.

proc mixed data=subject5;

class subject pricea priceb pricec;

model rate=pricea|priceb|pricec/ddfm=kr;

repeated pricea priceb pricec/subject=subject type=un@un;

run;

Thanks for any help anyone can provide.

Accepted Solutions
Solution
‎05-31-2014 10:32 PM
Occasional Contributor
Posts: 7

## Re: Is it possible to specify 3 repeated factors in Proc Mixed?

I would consider writing the following REPEATED statement:

repeated pricea*priceb*pricec / subject=subject type=un;

Ryan

All Replies
Solution
‎05-31-2014 10:32 PM
Occasional Contributor
Posts: 7

## Re: Is it possible to specify 3 repeated factors in Proc Mixed?

I would consider writing the following REPEATED statement:

repeated pricea*priceb*pricec / subject=subject type=un;

Ryan

Posts: 2,655

## Re: Is it possible to specify 3 repeated factors in Proc Mixed?

This is undoubtedly the only way to get after this, unless there is a natural nesting of some of the factors.  I would be curious about the design that gives rise to this--would it be possible to reparameterize so that this could be fit in a less "bulky" form.  I worry about the following--suppose each of the prices has three levels.  The three-way interaction will have 27 levels, and an unstructured matrix will require estimating 351 parameters.  It is going to take a large dataset to get good estimates for that many parameters.

Steve Denham

New Contributor
Posts: 2

## Re: Is it possible to specify 3 repeated factors in Proc Mixed?

Steve,  You guessed right.  Each price did have 3 levels.  Each subject evaluated 27 product "bundles."  Each bundle contained the same 3 products, and the prices of each product were manipulated at 3 levels each.  Subjects rated the attractiveness of the overall bundle.  I'll consider ways to reparameterize the model, but our goal is to test for possible interactions between the prices.

Danny

Posts: 2,655

## Re: Is it possible to specify 3 repeated factors in Proc Mixed?

Ryan's suggestion should work, but you will need about 10 times as many records as parameters to be able to get it to converge to anything reasonable.

(And a fairly intense computing platform).

Steve Denham

🔒 This topic is solved and locked.