BookmarkSubscribeRSS Feed
monishwan
Fluorite | Level 6
%mktruns(2 2 2 2 2 3 4 3 3);
%mktex(2 2 2 2 2 3 4 3 3, n=72);
proc format;
value Taste         1 = 'Status quo' 2 = 'Under desirable limits';
value Odour         1 = 'Status quo' 2 = 'Under desirable limits';
value Colour        1 = 'Status quo' 2 = 'Under desirable limits';
value Turbidity     1 = 'Status quo' 2 = 'Under desirable limits';
value Waterquantity 1 = 'Status quo' 2 = 'Increased';
value Accessibility 1 = 'Status quo' 2 = 'Single tap' 3 = 'Multiple taps';
value Prices        1 = 'Status quo' 2 = 200 3 = 275 4 = 350;
value Frequency     1 = 'Status quo' 2 = 'twice' 3 = 'thrice';
value Duration      1 = 'Status quo' 2 = 'two' 3 = 'three';
proc print; run;
%mktlab(data=design, vars=Taste Odour Colour Turbidity Waterquantity Accessibility Prices Frequency Duration, 
int=f1-f3,
out=final,
stmts=format Taste Taste. Odour Odour. Colour Colour. Turbidity Turbidity. Waterquantity Waterquantity. Accessibility Accessibility. Prices Prices. Frequency Frequency. Duration Duration.)
proc print; run;

I have absolutely no problem in executing my code till this point.

%choiceff(data=final,
bestout=sasuser.trial,
model=class(Taste Odour Colour Turbidity Waterquantity Accessibility Prices Frequency Duration / sta),
nsets=9,
seed=205,
flags=f1-f3,
options=relative,
beta=zero);

after this I got errors in the form of:

 %choiceff(data=final,
 72         bestout=sasuser.trial,
 73         model=class(Taste Odour Colour Turbidity Waterquantity Accessibility Prices Frequency Duration / sta),
 74         nsets=9,
 75         seed=205,
 76         flags=f1-f3,
 77         options=relative,
 78         beta=zero);
 78          'TasteStatus quo'n 'OdourStatus quo'n 'ColourStatus quo'n 'TurbidityStatus quo'n 'Waterquantitystatus quo'n
             __________________
             22
             200
 78       ! 'Accessibilitystatus quo'n 'AccessibilitySingle tap'n 'PricesStatus quo'n Prices200 Prices275 'FrequencyStatus quo'n
 78       ! Frequencytwice
 ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, a numeric constant, a datetime constant, 
               a missing value, (, (|, ), *, ',', -, =, [, |, }.  
 
 ERROR 200-322: The symbol is not recognized and will be ignored.
 
 ERROR: END does not occur within DO group at line=71 col=1.
 ERROR: Variable EFFICIENCY not found.
 ERROR: Variable DESIGN not found.
 ERROR: Syntax error.  Check your macro arguments for validity.
 ERROR: The CHOICEFF macro ended abnormally.

please help me here. Thank you

4 REPLIES 4
BeverlyBrown
Amethyst | Level 16

Hi @monishwan, I checked with an expert here at SAS. He said PROC IML does not allow the use of VALIDVARNAME=ANY, which disallows named literals. Since the code being executed is trying to use named literals (for example: ‘tastestatus quo’n), an error is generated. If this is an important feature to you, I encourage you to create a SASware Ballot here: https://communities.sas.com/t5/SASware-Ballot-Ideas/idb-p/sas_ideas. Thank you for using the SAS communities.

Learn from the Experts! Check out the huge catalog of free sessions in the Ask the Expert webinar series.
monishwan
Fluorite | Level 6

Thank you ma'am.Smiley Happy

TB5
Calcite | Level 5 TB5
Calcite | Level 5
It has been long since you've posted this problem. Have u in the meantime got a solution? I faced a similar problem with SAS EG.
monishwan
Fluorite | Level 6

Re: input statement and merging of choice design and collected data(help)

Type this in your help bar.

This is the discussion which includes my entire code (almost). I hope this can solve your problem.

 

https://communities.sas.com/t5/SASware-Ballot-Ideas/idb-p/sas_ideas

 

type the problem statement in the above link's search bar.

CFC_SAS_Communities_400x225.jpg

Call for content now open!

It's your turn to help shape SAS Innovate 2027. Share your expertise and inspire the SAS community.

Submit your proposal →

Develop Code with SAS Studio

Get started using SAS Studio to write, run and debug your SAS programs.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 2894 views
  • 0 likes
  • 3 in conversation