MyNixOS website logo
Description

Lactation Curve Parameter Estimation.

AllCurves() runs multiple lactation curve models and extracts selection criteria for each model. This package summarises the most common lactation curve models from the last century and provides a tool for researchers to quickly decide on which model fits their data best to proceed with their analysis. Start parameters were optimized based on a dataset with 1.7 million Holstein-Friesian cows. If convergence fails, the start parameters need to be manually adjusted. The models included in the package are taken from: (1) Michaelis-Menten: Michaelis, L. and M.L. Menten (1913). <www.plantphys.info/plant_physiology/copyright/MichaelisMentenTranslation2.pdf> (1a) Michaelis-Menten (Rook): Rook, A.J., J. France, and M.S. Dhanoa (1993). <doi:10.1017/S002185960007684X> (1b) Michaelis-Menten + exponential (Rook): Rook, A.J., J. France, and M.S. Dhanoa (1993). <doi:10.1017/S002185960007684X> (2) Brody (1923): Brody, S., A.C. Ragsdale, and C.W. Turner (1923). <doi:10.1085/jgp.5.6.777> (3) Brody (1924): Brody, S., C.W. Tuner, and A.C. Ragsdale (1924). <https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2140670/> (4) Schumacher: Schumacher, F.X. (1939) in Thornley, J.H.M. and J. France (2007). <https://books.google.com.au/books/about/Mathematical_Models_in_Agriculture.html?id=rlwBCRSHobcC&redir_esc=y> (4a) Schumacher (Lopez et al. 2015): Lopez, S. J. France, N.E. Odongo, R.A. McBride, E. Kebreab, O. AlZahal, B.W. McBride, and J. Dijkstra (2015). <doi:10.3168/jds.2014-8132> (5) Parabolic exponential (Adediran): Adediran, S.A., D.A. Ratkowsky, D.J. Donaghy, and A.E.O. Malau-Aduli (2012). <doi:10.3168/jds.2011-4663> (6) Wood: Wood, P.D.P. (1967). <doi:10.1038/216164a0> (6a) Wood reparameterized (Dhanoa): Dhanoa, M.S. (1981). <doi:10.1017/S0003356100027276> (6b) Wood non-linear (Cappio-Borlino): Cappio-Borlino, A., G. Pulina, and G. Rossi (1995). <doi:10.1016/0921-4488(95)00713-U> (7) Quadratic Polynomial (Dave): Dave, B.K. (1971) in Adediran, S.A., D.A. Ratkowsky, D.J. Donaghy, and A.E.O. Malau-Aduli (2012). <doi:10.3168/jds.2011-4663> (8) Cobby and Le Du (Vargas): Vargas, B., W.J. Koops, M. Herrero, and J.A.M Van Arendonk (2000). <doi:10.3168/jds.S0022-0302(00)75005-3> (9) Papajcsik and Bodero 1: Papajcsik, I.A. and J. Bodero (1988). <doi:10.1017/S0003356100003275> (10) Papajcsik and Bodero 2: Papajcsik, I.A. and J. Bodero (1988). <doi:10.1017/S0003356100003275> (11) Papajcsik and Bodero 3: Papajcsik, I.A. and J. Bodero (1988). <doi:10.1017/S0003356100003275> (12) Papajcsik and Bodero 4: Papajcsik, I.A. and J. Bodero (1988). <doi:10.1017/S0003356100003275> (13) Papajcsik and Bodero 6: Papajcsik, I.A. and J. Bodero (1988). <doi:10.1017/S0003356100003275> (14) Mixed log model 1 (Guo and Swalve): Guo, Z. and H.H. Swalve (1995). <https://journal.interbull.org/index.php/ib/issue/view/11> (15) Mixed log model 3 (Guo and Swalve): Guo, Z. and H.H. Swalve (1995). <https://journal.interbull.org/index.php/ib/issue/view/11> (16) Log-quadratic (Adediran et al. 2012): Adediran, S.A., D.A. Ratkowsky, D.J. Donaghy, and A.E.O. Malau-Aduli (2012). <doi:10.3168/jds.2011-4663> (17) Wilmink: J.B.M. Wilmink (1987). <doi:10.1016/0301-6226(87)90003-0> (17a) modified Wilmink (Jakobsen): Jakobsen J.H., P. Madsen, J. Jensen, J. Pedersen, L.G. Christensen, and D.A. Sorensen (2002). <doi:10.3168/jds.S0022-0302(02)74231-8> (17b) modified Wilmink (Laurenson & Strucken): Strucken E.M., Brockmann G.A., and Y.C.S.M. Laurenson (2019). <http://www.aaabg.org/aaabghome/AAABG23papers/35Strucken23139.pdf> (18) Bicompartemental (Ferguson and Boston 1993): Ferguson, J.D., and R. Boston (1993) in Adediran, S.A., D.A. Ratkowsky, D.J. Donaghy, and A.E.O. Malau-Aduli (2012). <doi:10.3168/jds.2011-4663> (19) Dijkstra: Dijkstra, J., J. France, M.S. Dhanoa, J.A. Maas, M.D. Hanigan, A.J. Rook, and D.E. Beever (1997). <doi:10.3168/jds.S0022-0302(97)76185-X> (20) Morant and Gnanasakthy (Pollott et al 2000): Pollott, G.E. and E. Gootwine (2000). <doi:10.1017/S1357729800055028> (21) Morant and Gnanasakthy (Vargas et al 2000): Vargas, B., W.J. Koops, M. Herrero, and J.A.M Van Arendonk (2000). <doi:10.3168/jds.S0022-0302(00)75005-3> (22) Morant and Gnanasakthy (Adediran et al. 2012): Adediran, S.A., D.A. Ratkowsky, D.J. Donaghy, and A.E.O. Malau-Aduli (2012). <doi:10.3168/jds.2011-4663> (23) Khandekar (Guo and Swalve): Guo, Z. and H.H. Swalve (1995). <https://journal.interbull.org/index.php/ib/issue/view/11> (24) Ali and Schaeffer: Ali, T.E. and L.R. Schaeffer (1987). <https://cdnsciencepub.com/doi/pdf/10.4141/cjas87-067> (25) Fractional Polynomial (Elvira et al. 2013): Elvira, L., F. Hernandez, P. Cuesta, S. Cano, J.-V. Gonzalez-Martin, and S. Astiz (2012). <doi:10.1017/S175173111200239X> (26) Pollott multiplicative (Elvira): Elvira, L., F. Hernandez, P. Cuesta, S. Cano, J.-V. Gonzalez-Martin, and S. Astiz (2012). <doi:10.1017/S175173111200239X> (27) Pollott modified: Adediran, S.A., D.A. Ratkowsky, D.J. Donaghy, and A.E.O. Malau-Aduli (2012). <doi:10.3168/jds.2011-4663> (28) Monophasic Grossman: Grossman, M. and W.J. Koops (1988). <doi:10.3168/jds.S0022-0302(88)79723-4> (29) Monophasic Power Transformed (Grossman 1999): Grossman, M., S.M. Hartz, and W.J. Koops (1999). <doi:10.3168/jds.S0022-0302(99)75464-0> (30) Diphasic (Grossman 1999): Grossman, M., S.M. Hartz, and W.J. Koops (1999). <doi:10.3168/jds.S0022-0302(99)75464-0> (31) Diphasic Power Transformed (Grossman 1999): Grossman, M., S.M. Hartz, and W.J. Koops (1999). <doi:10.3168/jds.S0022-0302(99)75464-0> (32) Legendre Polynomial (3th order): Jakobsen J.H., P. Madsen, J. Jensen, J. Pedersen, L.G. Christensen, and D.A. Sorensen (2002). <doi:10.3168/jds.S0022-0302(02)74231-8> (33) Legendre Polynomial (4th order): Jakobsen J.H., P. Madsen, J. Jensen, J. Pedersen, L.G. Christensen, and D.A. Sorensen (2002). <doi:10.3168/jds.S0022-0302(02)74231-8> (34) Legendre + Wilmink (Lidauer): Lidauer, M. and E.A. Mantysaari (1999). <https://journal.interbull.org/index.php/ib/article/view/417> (35) Natural Cubic Spline (3 percentiles): White, I.M.S., R. Thompson, and S. Brotherstone (1999). <doi:10.3168/jds.S0022-0302(99)75277-X> (36) Natural Cubic Spline (4 percentiles): White, I.M.S., R. Thompson, and S. Brotherstone (1999). <doi:10.3168/jds.S0022-0302(99)75277-X> (37) Natural Cubic Spline (5 percentiles): White, I.M.S., R. Thompson, and S. Brotherstone (1999) <doi:10.3168/jds.S0022-0302(99)75277-X> (38) Natural Cubic Spline (defined knots according to Harrell 2001): Jr. Harrell, F.E. (2001). <https://link.springer.com/book/10.1007/978-3-319-19425-7> The selection criteria measure the goodness of fit of the model and include: Residual standard error (RSE), R-square (R2), log likelihood, Akaike information criterion (AIC), Akaike information criterion corrected (AICC), Bayesian Information Criterion (BIC), Durbin Watson coefficient (DW). The following model parameters are included: Residual sum of squares (RSS), Residual standard deviation (RSD), F-value (F) based on F-ratio test.

lactcurves

The goal of lactcurves is to provide parameter estimates and selection criteria for lactation curve models, cubic splines, and legendre polynomials. Start parameters for lactation curve models were optimized using milk yield test-day data across the first three lactations of ~1.7 million Holstein Friesian cows. Other data might require adjusting of the start parameters, but the lactcurve package gives a comprehensive source of models over the last 100 years.

Installation

You can install the released version of lactcurves from CRAN with:

install.packages("lactcurves")

Example

This is a basic example which shows you how to solve a common problem:

library(lactcurves)
## basic example code

create data set for 3 individuals with milk yield records on 24 days

ID=c(rep("ID123",24),rep("ID456",24),rep("ID789",24))

dim=as.integer(rep(seq(from=5, to=340, by=14),3))

mkg=as.numeric(c(23.4,28.3,30.5,31.3,31.5,31.3,30.9,30.5,30.1,29.6,29.1,28.7,28.2,27.7,27.2,26.7, 26.2,25.7,25.2,24.7,24.2,23.7,23.2,22.8, 21.3,25.7,26.9,27.2,26.9,26.5,26.1,25.6,25.1,24.6,24.1,23.6,23.1,22.6,22.1,21.6,21.1,20.6,20.1, 19.6,19.1,18.6,18.1,17.6, 22.0,26.5,28.1,28.4,28.2,27.9,27.4,26.9,26.4,25.9,25.4,24.9,24.4,23.9,23.4,22.9,22.4,21.9,21.4, 20.9,20.4,19.9,19.4,18.9))

data=cbind.data.frame(ID,dim,mkg)

run example

output=AllCurves(data,mkg,dim)

output$critall output$modeldescrip output$critbest output$bestmodel output$Error output$ModelParam output$summary17b

plot curve

set the number of days to consider

dim=c(1:340)

look up the model and its estimated parameters

output$summary17b

use model and parameters to plot curve

plot(19.293701+(31.358471-19.293701)(1-exp(1)^(-0.059874dim))-0.035495*dim)

Metadata

Version

1.1.0

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows