BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I am not very statistically inclined, so please forgive my ignorance. I am trying to run an ANCOVA in EG 4.2. I cannot find any reference to where in any procedure one would add a covariate. I have done these analyses in Statistica before and were quite simple and intuitive to set up.

I suspect I'm looking for the wrong term or am in the wrong procedure, but I'm also surprised that it hasn't revealed itself to me more immediately.

Any help or thoughts would be greatly appreciated. Thanks!
7 REPLIES 7
TheChadd
Calcite | Level 5
proc reg will do ANCOVA for you.
example:
dependent variable: z
independent categorical variable: x
independent continuous variable: y

proc REG;
model z= x y;

This assumes equal slopes. You can modify this to have unequal slopes, too.

Cheers,
Chadd
deleted_user
Not applicable
Thank you for the response. However, I am using Enterprise Guide, and really have no idea on how to input code. Do you have any ideas on how to "point and click" my way through setting up an ANCOVA in EG?
TheChadd
Calcite | Level 5
Honestly, I gave up on EG after playing around with it for a month or so :(. I found it easier to just do my analyses in SAS or JMP. I'm not sure if EG has a pre-coded solution for ANCOVA.
Doc_Duke
Rhodochrosite | Level 12
ANCOVA is a type of linear model. So, go to
Tasks --> ANOVA --> Linear Models
and you can put in your classification variables and you continuous covariates.

Doc Muhlbaier
Duke
deleted_user
Not applicable
OK...

Let's say I have an independant variable (A), a bunch of dependant variables (1,2,3, and 4) and a covariate (C). How do I set that up in the Model screen? Is that where I assign the covariate? Or is the covariate the "Quantitative Variable" on the Data screen?

Once again, I'm not smart, and really appreciate the help. Thanks!
Doc_Duke
Rhodochrosite | Level 12
ANCOVA is designed for one dependent variable at a time. Although the general linear model will handle multiple dependent variables simultaneously, that is not part of the EGuide interface and is a rather advanced topic.

Continuous variables are the quantitative variables on the Data tab. In ANCOVA terms they would be covariates.
Classification variables are the grouping variables, and would be labeled the independent variables in ANCOVA.

After assigning the variable types in the data tab, their roles are assigned in the Model tab. In classic one-way ANCOVA, they would both be main effects.

You can get more details with the context sensitive help key (F1) in EGuide.
ChrisHemedinger
Community Manager
The Linear Models interface in EG doesn't facilitate ANCOVA easily, but you can accomplish it with just a bit of code. Here is an example from one of our educators. Note that it uses ODS graphics and PLOTS=ALL, so it will generate the Analysis of Covariance plot as well.

/* ANCOVA */
ods graphics on;
proc glm data=sashelp.cars PLOTS=all;
class type origin;
model invoice = type | origin | mpg_highway;
run;
It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 7 replies
  • 2440 views
  • 0 likes
  • 4 in conversation