R$ Rumen in situ degradation parameters and effective degradability calculator
by Youngjun Na
반추위 in situ 실험을 수행한 이후 소실율 데이터를 이용하여 degradation parameters 및 effective degradability calculator을 계산하는 함수입니다.
Degradation parameters and effective degradability
- Degradation parameter was made using the formula of Ørskov and McDonald (1979): \(P = a + b × ( 1 - e^-ct)\)
- where P: the actual degradation after time ‘t’; a: the intercept of the degradation curve at time zero; b: the potential degradability of the component of the protein which will, in time, be degraded; c: the rate constant for the degradation of ‘b’; t: time.
- The effective degradability (ED) of DM and CP was calculated using the following equation: \(ED = a + (b × c)/(c + k)\)
- where k was the estimated rate of outflow from the rumen and a, b, and c are the same parameters as described above.
- The ED was estimated as ED2, ED5, and ED8 assuming rumen solid outflow rates of 0.02, 0.05, and 0.08/h, which was representative for low, medium, and high feeding intake respectively (ARC, 1984).
R codes for calculation
for single data
hour<-c(0,2,4,8,16,24,48)
DMD<-c(90,88,80,75,58,43,10)
insitu<-function(hour,DMD){
require(dplyr)
df<-data.frame(hour,DMD)
n<-nrow(df)
df1<-mutate(df, DMD_1=(DMD-DMD[n])/100)
df2<-df1[-n,]
df2<-mutate(df2, DMD_exp=(log(DMD_1,exp(1))))
reg<-lm(df2$DMD_exp~df2$hour)
reg<-reg$coefficients
intercept<-reg[1]
x<-reg[2]
b<-exp(intercept)*100
a<-100-b-df1$DMD[n]
c<-(-x)
ED2<-a+((b*c)/(c+0.02))
ED5<-a+((b*c)/(c+0.05))
ED8<-a+((b*c)/(c+0.08))
result<-data.frame(Item=c("a","b","c","ED2","ED5","ED8"), Value=c(a,b,c,ED2,ED5,ED8))
print(result)
}
insitu(hour,DMD)
for multiple data
example data link: https://github.com/YoungjunNa/animal_science/blob/master/insitu.xlsx
library(dplyr)
insitu <- readxl::read_excel("insitu.xlsx")
result<-data.frame(Item=c("a","b","c","ED2","ED5","ED8"),"1"=NA,"2"=NA,"3"=NA,"4"=NA,"5"=NA,"6"=NA)
for(i in 1:14){
hour <- c(0,8,16,24,48)
DMD <- insitu[,i]
df<-data.frame(hour,DMD)
colnames(df) <- c("hour","DMD")
n<-nrow(df)
DMD_end <- as.numeric(DMD[n,])
df1<-mutate(df, DMD_1=(DMD-DMD_end)/100)
df2<-df1[-n,]
df2<-mutate(df2, DMD_exp=(log(DMD_1,exp(1))))
reg<-lm(df2$DMD_exp~df2$hour)
reg<-reg$coefficients
intercept<-reg[1]
x<-reg[2]
b<-exp(intercept)*100
a<-100-b-df1$DMD[n]
c<-(-x)
ED2<-a+((b*c)/(c+0.02))
ED5<-a+((b*c)/(c+0.05))
ED8<-a+((b*c)/(c+0.08))
result[1,i+1] <- a
result[2,i+1] <- b
result[3,i+1] <- c
result[4,i+1] <- ED2
result[5,i+1] <- ED5
result[6,i+1] <- ED8
}
Literature cited
- ARC, 1984. The Nutrient Requirements of Ruminant Livestock, Suppl. No. 1. Agricultural Research Council, Commonwealth Agric. Bureau, Farnham Royal.
- Ørskov, E. R., and I. McDonald. 1979. The estimation of protein degradability in the rumen from incubation measurements weighted according to rate of passage. J. Agric. Sci. 92:499.
Subscribe via RSS