BookmarkSubscribeRSS Feed
always-good
Obsidian | Level 7

Dear all,

I have an example for which I'm confused to set the best model.

I want to see the effect of the season on the milk production of crossbred cows. Seasons are: Summer season= Jun-Jull-Aug Winter season= Dec-Janv-Fev; There are two groups : 40 animals with the same lactation stage and the same characteristics in each season.

can we say: Yij=u+Si+ei (GLM);  OR Yijk= u+Si+Mj+(SxM)ij+ek, where m = random effect of the month

but I think it is useless because the month is included in the season. Which is the best model or is there other options.

Looking forward to an answer

6 REPLIES 6
PaigeMiller
Diamond | Level 26

Since month is included in season, I would not put both in the model. Just use month. You can create a contrast that compares the effect of June/July/Aug to Dec/Jan/Feb.

--
Paige Miller
always-good
Obsidian | Level 7

the main effect is basically the season, can we say that month is a repeated measurement? in this case is this a mixed linear model? and how to present the month in the result table please?

PaigeMiller
Diamond | Level 26

@always-good wrote:

the main effect is basically the season, can we say that month is a repeated measurement?


 

As you are the subject matter expert, and not me, these are decisions you need to make. I have no opinion one way or the other as I don't work with cows or any type of similar study.

 

in this case is this a mixed linear model? 

 

If you decide these are repeated measurements, then I think so.

 

and how to present the month in the result table please?

 

what table are you talking about?

--
Paige Miller
always-good
Obsidian | Level 7

Hello, 

Sorry for the misunderstanding, I'm asking if both options are correct first to decide whether it is GLM or can be mixed.

I mean to present the effect of the month as a repeated measurement. 

Thank you 

Ksharp
Super User
" I think it is useless because the month is included in the season. "
It is depended on what you want,
if you only focus on season effect,you don't need month effect any more.
if you also take into account of month effect within season effect,you could take month effect too.

If you think each cow have different milk production in different season,You can use MIXED model.
If you think all the cows in the same group have same milk production in different season,You can use GLM model.

In summary,I would use Mixed model if you take a cow as a SUBJECTID.
if you only consider the population of cow within a group I would use GLM .

And better post it at Stat Forum:
https://communities.sas.com/t5/Statistical-Procedures/bd-p/statistical_procedures

@StatDave @lvm @SteveDenham could give you a hand.
mkeintz
PROC Star

If you know the month, you already know the season.

 

When one predictor is entirely predictable from another predictor, I believe that the resulting SSCP matrix will not be invertible, as it won't be full rank.  

 

--------------------------
The hash OUTPUT method will overwrite a SAS data set, but not append. That can be costly. Consider voting for Add a HASH object method which would append a hash object to an existing SAS data set

Would enabling PROC SORT to simultaneously output multiple datasets be useful? Then vote for
Allow PROC SORT to output multiple datasets

--------------------------

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 6 replies
  • 884 views
  • 3 likes
  • 4 in conversation