08-30-2016 09:25 AM - edited 08-30-2016 09:26 AM
I am trying to show certain parameter estimates in a caterpillar graph.
I am conducting a Bayesian analysis with proc bchoice and get many different estimates per individual (I have 1,000 survey participants).
So e.g. I have a variable that is named AA,N 0001 which is the estimate for AA for individual 0001.
I am trying to put all estimates in a caterpillar graph but it wouldn't work.
I have tired %cater(datat=mydata, var=AA,N_: ) ; but I get: All positional parameters must percede keyword parameters.
If I try %cater(datat=mydata, var=AA: ) ; but I get: Syntax error.
Thanks for your help!
08-30-2016 10:28 AM
08-30-2016 09:53 AM
08-30-2016 10:04 AM
thank your for your quick answer. I just ran proc contents and it shows me the variable names (e.g. AA,N 0001, AA,N 0002, etc.), the type (numerical) and the length (8).
Do you think I have to rename the variables?
08-30-2016 10:28 AM
08-30-2016 10:32 AM
the variables are produced by the BCHOICE procedure. I am using the "random" option in order to create a random effects model.
The variables are produced in the output data set.
08-30-2016 11:10 AM
I think you are seeing labels, not variable names. Run the following to see the real names:
proc contents data=MY_OUTPUT_DATA short;
You ought to be able to cut and paste from that output into the macro.
I ran the Getting Started example, which uses a RANDOM statement. I used the OUTPOST= option on the PROC BCHOICE statement to create an output data set. In that example, the variable names are created as normal SAS variables, but the labels are as you described.
08-31-2016 05:03 AM
I did run proc contents and it shows me the Variables (AA,N 0001), its type, the length and the label (AA,N 0001). So the label and the variable name seem to be identical in this case. How can this be?
08-31-2016 05:26 AM
1. the PROC BCHOICE code that you are using
2. The output from
proc contents data=MY_OUTPUT_DATA SHORT;
where you replace MY_OUTPUT_DATA by the name of the data set created by PROC BCHOICE.
08-31-2016 05:46 AM
08-31-2016 06:27 AM
Please also submit
proc options option=validvarname value;
and copy/paste the output that appears in the SAS log. It will look something like this:
Option Value Information For SAS Option VALIDVARNAME
How option value set: Shipped Default