Hello
I would like to test the variable "beta", "gamma", and "alpha" (these are continuous variables) in two different level of "pet_type". Pet_type is a class variable with two values: "dog" or "cat". Ultimately, I would like to have a graph something like this
my code is
proc glm data = have ;
class pet_type ;
model logsale = beta gamma alpha pet_type pet_type*beta pet_type*gamma pet_type*alpha/ss3;
lsmeans pet_type*gamma/ slice = pet_type;
lsmeans pet_type*beta/ slice = pet_type;
lsmeans pet_type*alpha/ slice = pet_type;
run;
but I've got an error message that "only CLASS variables allowed in this effect." Please help!
Thank you for letting me know! Pet_type is a category variable but alpha, beta, and gamma are not.. so what do you suggest?
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!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.