Hi everybody, I have a question about programming a DCE, and I really hope somebody can help me since I'm not used to work in SAS (different coding..). I want to create a DCE with two options (vaginal delivery vs caesarean delivery) and different scenario alternatives consisting of 5 attributes, and 2-3 levels (see below) Attributes Level 1 level 2 level 3 Age mother 22 year 32 year 42 year BMI mother 23 32 Parity Primiparity Multiparity – in obstetric history normal vaginal birth Multiparity – in obstetric history previous caesarean for dystocia Underlying pathology No – uncomplicated pregnancy Yes – mild preeclampsia Estimated birth weight 2400g 3300g 4000g So 108 possibilities and I think it should be a factorial design. I tried looking in the community and searching in PROC BCHOICE but it won't work. See below for my attempt. What am I doing wrong and what is next in order to create the question like the added file? Thank you so much! %mktruns (2 ** 2 3 ** 3); %mktex (2 ** 2 3 ** 3, n=72, seed= ?); Proc format; value Age 1 = 22 2 = 32 3 = 42; value BMI 1 = 23 2 = 32 ; value Parity 1 = primiparity 2= multiparity in obstetric history normal vaginal birth 3 = multiparity in obstetric history previous caesarean for abnormal CTG; value Underlying_pathology 1 = no uncomplicated pregnancy 2 = yes mild preeclampsia; value Estimated_birth_weight 1 = 2400 2 = 3300 3 = 4000; run; %mktlab(data=design, /* input data set */ Vars= Age BMI Parity Underlying_pathology Estimated_birth_weight, /* new attribute names */ int=f1-f2, /* create 2 columns of 1’s in f1-f2 */ out=final, /* output design add a format statement for the attributes */ stms=format Age Age. BMI BMI. Parity Parity. Underlying_pathology Underlying_pathology. Estimated_birth_weight Estimated_birth_weight.) proc print; run;
... View more