Programming the statistical procedures from SAS

including holdout task in my cbc experiment

Reply
Occasional Contributor
Posts: 6

including holdout task in my cbc experiment

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=xSmiley Happy
%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!
Occasional Contributor
Posts: 6

what i forgot:

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
Ask a Question
Discussion stats
  • 1 reply
  • 73 views
  • 0 likes
  • 1 in conversation