BookmarkSubscribeRSS Feed
oraider
Calcite | Level 5
Hey everybody,

I am preparing a discrete choice experiment. I did a linear design with kuhfeld's sas makros, %mktex to be precise.

I now need to add holdout tasks, which turned out to be rather difficult, as i placed restrictions on my design. Everytime I add holdouts using the holdout= option of the %mktex makro, the result is that the restrictions in my choice tasks are gone.

this is the code i used:

%macro restrict;
bad = (x6=1 & (x4=2 | x4=3))+(x12=1 & (x10=2 | x10=3))+(x18=1 & (x16=2 | x16=3))+(x24=1 & (x22=2 | x22=3))+
(x4=1 & x6=2)+(x10=1 & x12=2)+(x16=1 & x18=2)+(x22=1 & x24=2)+
(x3=1 & (x5=2 | x5=3))+ (x3=2 & (x5=1 | x5=3))+(x3=3 & (x5=1 | x5=2))+
(x9=1 & (x11=2 | x11=3))+ (x9=2 & (x11=1 | x11=3))+(x9=3 & (x11=1 | x11=2))+
(x15=1 & (x17=2 | x17=3))+(x15=2 & (x17=1 | x17=3))+(x15=3 & (x17=1 | x17=2))+
(x21=1 & (x23=2 | x23=3))+ (x21=2 & (x23=1 | x23=3))+(x21=3 & (x23=1 |x23=2));
%mend;
%mktex(4 3 3 3 3 2 4 3 3 3 3 2 4 3 3 3 3 2 4 3 3 3 3 2, n=72,restrictions=restrict, seed=12, options=resrep quickr )
%mktex(4 3 3 3 3 2 4 3 3 3 3 2 4 3 3 3 3 2 4 3 3 3 3 2, n=78, init=randomized,
seed=12, holdouts=6, options=resrep quickr nodups nosort);
%mkteval(data=randomized(where=(w=1)), factors=x:)
%mkteval(data=randomized(drop=w))
proc print data=randomized(firstobs=70); run;

This is followed by turning it into a choice design via %mktroll etc etc.
I can not run the restriction makro in the second %mktex-line, as sas tells me problems occur if i include both an init= and and restriction= statement.

hope anyone can help me here, thanks!
1 REPLY 1
oraider
Calcite | Level 5
it would be a great help if someone could just tell me how i could include holdout tasks, that i designed myself.
that is, how i could define the choice sets and insert them manually. by doing so i could bypass the problem, i guess

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 16. 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
  • 1 reply
  • 1262 views
  • 0 likes
  • 1 in conversation