## Anything wrong with the code?

Solved
Occasional Contributor
Posts: 7

# Anything wrong with the code?

Hi everyone! I have a quick question. I'm using this code to check for if there is a correlation between edad*musc, edad*sexo, musc*sexo and edad*musc*sexo. My question is, in the random statement, is it correct to write toro(edad) like I'm doing? My only random would be toro, which is my independent variable, but edad, as well as musc and sexo are all dependent variables.

proc glimmix data=cruza;
model tern_co = edad | musc| sexo;
lsmeans edad | musc | sexo / pdiff lines;
proc glimmix data=cruza;
model Tern_cr = edad | musc| sexo;
lsmeans edad | musc| sexo / pdiff lines;
run;

Thanks.

Accepted Solutions
Solution
‎03-20-2018 11:44 AM
Posts: 3,059

## Re: Anything wrong with the code?

One concern is that you may be running low on degrees of freedom for error, and possibly eliminating the three-way interaction might help. Generally, I don't put three-way interactions into a model without having some subject matter reason for thinking it belongs. Other than that, it seems like the right model.

--
Paige Miller

All Replies
Posts: 3,059

## Re: Anything wrong with the code?

We don't know what the variables edad musc sexo and toro represent.

We don't know the design of your study either, which would also inform us about what the proper model and random statements are.

--
Paige Miller
Occasional Contributor
Posts: 7

## Re: Anything wrong with the code?

Hi! Sorry for not being specific. I'm studying the effect of castration
(sexo) and slaughter age (edad) in meat quality in two different muscles
(musc). We used 30 animals in total, 15 of them were castrated and 15
remained intact. So each animal is represented by the (toro) variable.
Super User
Posts: 23,773

## Re: Anything wrong with the code?

That's a fairly complex model for only 30 observations...

Solution
‎03-20-2018 11:44 AM
Posts: 3,059

## Re: Anything wrong with the code?

One concern is that you may be running low on degrees of freedom for error, and possibly eliminating the three-way interaction might help. Generally, I don't put three-way interactions into a model without having some subject matter reason for thinking it belongs. Other than that, it seems like the right model.

--
Paige Miller
☑ This topic is solved.