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.  

SAS Innovate 2025: Call for Content

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!

Submit your idea!

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.

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