Hi Reeza, I am using Sas 9.4. I have run your suggested codes but it does't work. Below are logs. Thank you very much for help! ===== 3 /*----------------------------------------------------------------- 4 S A S S A M P L E L I B R A R Y 5 6 NAME: BCHCEX9 7 TITLE: Documentation Example 9 for PROC BCHOICE 8 Allocation choice example 9 PRODUCT: STAT 10 SYSTEM: ALL 11 KEYS: 12 PROCS: BCHOICE 13 DATA: 14 15 SUPPORT: Amy Shi 16 REF: PROC BCHOICE, EXAMPLE 9 17 MISC: 18 -----------------------------------------------------------------*/ 19 20 data MAMR; 21 input ID Set None TrtScheme RespRate Time Status TrtLine Risk Cost Alloc @@; 22 datalines; NOTE: SAS went to a new line when INPUT statement reached past the end of a line. NOTE: The data set WORK.MAMR has 5852 observations and 11 variables. NOTE: DATA statement used (Total process time): real time 0.22 seconds cpu time 0.03 seconds 5875 ; 5876 5877 proc print data=MAMR(obs=20); NOTE: Writing HTML Body file: sashtml.htm 5878 run; NOTE: There were 20 observations read from the data set WORK.MAMR. NOTE: PROCEDURE PRINT used (Total process time): real time 1.08 seconds cpu time 0.54 seconds 5879 5880 proc bchoice data=MAMR seed=124 nthreads=8 nmc=20000 nthin=2 plots=none; 5881 class TrtScheme(ref=first) RespRate Time Status TrtLine Risk Cost ID Set 5882 / ref=last; 5883 model Alloc = / choiceset=(ID Set) choicetype=allocation; ---------- 22 202 ERROR 22-322: Syntax error, expecting one of the following: ;, ALTERIDX, CHOICESET, COEFFPRIOR, COVPRIOR, COVTYPE, CPRIOR, INIT, INITIAL, LAMBDAPRIOR, LPRIOR, NEST, SAMELAMBDA, TYPE. ERROR 202-322: The option or parameter is not recognized and will be ignored. 5884 random TrtScheme RespRate Time Status TrtLine Risk Cost ERROR: Variable ALLOCATION not found. NOTE: PROCEDURE BCHOICE used (Total process time): real time 0.18 seconds cpu time 0.00 seconds NOTE: The SAS System stopped processing this step because of errors. 5885 / subject=ID remean; 5886 run;
... View more