how can I solve the error "variable GROUP is not found in proc lattice?
... by providing the LATTICE procedure with a GROUP variable.
See here to find out how the input data set should look like when using the LATTICE procedure.
https://go.documentation.sas.com/doc/en/statug/15.2/statug_lattice_details01.htm
Four numeric SAS variables, Group
, Block
, Treatment
, and Rep
, are used in the input data set to define the lattice design. The Group
, Block
, and Treatment
variables are required in the data set to which PROC LATTICE is applied. For compatibility with previous releases, the third variable can alternatively be named Treatmnt
. The Rep
variable must be present when the design involves repetition of the entire basic plan.
Every numeric variable other than Group
, Block
, Treatment
, or Rep
in the input SAS data set may be considered a response variable. A VAR statement tells PROC LATTICE that only the variables listed in the VAR statement are to be considered response variables. If the VAR statement is omitted, then all numeric variables, excluding Group
, Block
, Treatment
, and Rep
, are considered response variables. PROC LATTICE performs an analysis for each response variable.
Good luck,
Koen
yes that is general description but the problem what I meet is "ERROR: Variable GROUP not found." after running and this error appears under LOG.
Please post your PROC LATTICE code, using the running man in a square box icon. Could you also provide some idea of the data structure in your analysis dataset?
I suspect you have GROUP in your model statement, but that it does not appear in the dataset you are using.
SteveDenham
oky in my dataset I have, but after running it shows the message that error, in my data set the group already exists.
Hello,
I think you should make your group variable (with the name GROUP) numeric!
It's probably CHAR but it should be NUM.
Regards,
Koen
Run PROC CONTENTS on your dataset and post the results here. Then we can start to figure out what is going on.
SteveDenham
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.