BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
FestusAdejoro
Obsidian | Level 7

Here is the syntax I tried to run. It shows an error message that I need to include '=' somewhere but I can't figure where and why.

Any effort would be appreciated.

 

Data gain;

Label v1-v6=gain;

Input Treatment$ Block$ v1-v6;

Cards;

T1    R1    51.64304736 28.60340054 49.6  1.530405121 1.6   17.87712534

T1    R2    45.61911079 25.26693844 52.4  1.297341041 1.51  16.73307181

T1    R3    41.32557044 22.88888639 42.45 1.376310403 1.57  14.57890853

T1    R4    36.79370562 20.37883419 47.9  1.11925154  1.57  12.98014917

T1    R5    52.38605109 29.01492609 44    1.698368637 1.52  19.08876716

T2    R1    44.11789607 24.43546453 56.75 1.181806026 1.6   15.27216533

T2    R2    39.24314426 21.73549841 52.85 1.108883343 1.57  13.8442665

T2    R3    39.80628109 22.04740154 48.65 1.196865307 1.57  14.04293092

T2    R4    36.67429515 20.31269662 44.75 1.17401272  1.51  13.45211697

T2    R5    46.42807171 25.71499552 42.6  1.542159358 1.6   16.0718722

T3    R1    41.21164786 22.82578838 48.5  1.241993957 1.61  14.17750831

T3    R2    36.36072575 20.13902075 49    1.087404909 1.56  12.90962869

T3    R3    33.11588878 18.34181133 52.8  0.936411589 1.54  11.91026709

T3    R4    31.33307271 17.35436762 45.75 0.98654175  1.5   11.56957841

T3    R5    46.86195947 25.9553118  45.8  1.474270386 1.53  16.96425608

T4    R1    44.64555998 24.72772038 55.3  1.219383271 1.5   16.48514692

T4    R2    37.12680959 20.56332962 43.55 1.212976306 1.51  13.61809909

T4    R3    35.85177318 19.85712852 50.1  1.054479527 1.55  12.81105066

T4    R4    36.21592279 20.05881912 43.8  1.178147807 1.6   12.53676195

T4    R5    46.70096601 25.86614278 41    1.596407568 1.55  16.68783405

;

proc univariate plot normal;

title 'gain';

var v1-v6;

run;

Proc MIXED;

CLASS Treatment Block;

MODEL v1-v6 = Treatment/;

RANDOM block Treatment*Block;

LSMEANS Treatment/TDIFF ADJUST= TUKEY;

Run;

1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

In PROC MIXED, you would have to run six models, each with one variable to the left of the equal sign.

 

Or you could switch to PROC GLM and have six response variables, but this estimates results differently than PROC MIXED.

--
Paige Miller

View solution in original post

7 REPLIES 7
PaigeMiller
Diamond | Level 26

Here's the log showing the error

 

2243  Label v1-v6=gain;
              -
              73
              200
ERROR 73-322: Expecting an =.

ERROR 200-322: The symbol is not recognized and will be ignored.

 

You cannot use a list of variables, such as v1-v6, in the LABEL statement.

 

Similarly in PROC MIXED

 

2303  MODEL v1-v6 = Treatment/;
              -
              73
              200
ERROR 73-322: Expecting an =.
ERROR 200-322: The symbol is not recognized and will be ignored.

 

You can have only one variable to the left of the equal sign in PROC MIXED.

--
Paige Miller
data_null__
Jade | Level 19
attrib a1-a6 label='Gain';

You can use a SAS-Variable-list in an ATTRIB statement.

 

PROC MIXED allows only 1 dependent variable.  You might consider transposing V1-V6 to rows and using a BY statement.

 

 

FestusAdejoro
Obsidian | Level 7
Thank you. How do I then handle the model statement?
DanObermiller
SAS Employee

If you take the transpose route, you will have a column that identifies the V1-V6, let's call that column V_ID. The values would then be a column, let's call that GAIN.

 

Your model statement would be MODEL GAIN = TREATMENT ....

 

and then you would use BY V_ID.

Reeza
Super User

The method for many models is illustrated in this post:

https://blogs.sas.com/content/iml/2017/02/13/run-1000-regressions.html

PaigeMiller
Diamond | Level 26

In PROC MIXED, you would have to run six models, each with one variable to the left of the equal sign.

 

Or you could switch to PROC GLM and have six response variables, but this estimates results differently than PROC MIXED.

--
Paige Miller
ballardw
Super User

If you have a syntax error the LOG will show you. If you do not understand what the log tells you then copy the text of the log including the entire procedure or data step code plus all the notes, messages, warnings or errors. The on the forum open a text box using the </> icon above the message window and paste the text.

 

You have at least one error with the LABEL statement.

Label v1-v6=gain;

Is not valid. the structure of a label statement is

Label  variablename="quoted text for the label". You can have multiple variables but each must have it's own variablename='text' component.

 

 

 

 

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 7 replies
  • 1318 views
  • 6 likes
  • 6 in conversation