BookmarkSubscribeRSS Feed
Barkamih
Pyrite | Level 9

Hi guy 

I'm just wondering if anybody had done a lactation curves for milk records, 

I have a dataset of milk records for one year, and I have 29 variables but I'm interested with some of them as the following columns.

My questions is?

 

1- Is the PROC NLIN the best procedure to fit this lactation curve? and how the model will look like? 

 

 

MILK_KGTEST_DATE,

Which MILK_KG column has the milk kg per test with a minimum of  4 tests (four times per season) and maximum of 10 (ten times per season)  for each individual cow and TEST_DATE has the date of those tests.  The standard of this test will be ten times per season. the response variable will be MILK_KG. 

 

Regards

 

 

 

 

 

   

2 REPLIES 2
PGStats
Opal | Level 21

Proc NLIN is a general purpose tool for fitting non linear relationships between responses and predictors by least squares. More specialized methods might be more appropriate for your study but you do not provide enough information. What is your study about? Are there any treatments (breed, food, age, drugs, living conditions, time since calving, etc.) that affect lactation in your study?

PG
Rick_SAS
SAS Super FREQ

PROC NLIN fits nonlinear models, but it is up to you to specify the form of the parameters in the model. Your first step should be to do some research to find out how others have modeled the lactation curves.

 

Another thing to consider is that the milk production for each cow is correlated. If you want to model that autocorrelation, you might want to use PROC NLMIXED, where the cow ID is a subject effect.  I assume that these cows are all from the same farm? Otherwise, you have nested effects.  

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

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
  • 2 replies
  • 1369 views
  • 0 likes
  • 3 in conversation