# NOT RUN {
#EXAMPLE 1: INDIVIDUAL MODELLING
#--------------------------------------------------------
#For one child with default energy intake
child_weight(6,"male")
#For a child with specific energy intake
child_weight(6,"male",2.5, 16, as.matrix(rep(2000, 365)), days = 365)
#Using Richardson's energy
girl <- child_weight(6,"female", days=365, dt = 5,
richardsonparams = list(K = 2700, Q = 10,
B = 12, A = 3, nu = 4, C = 1))
plot(girl$Body_Weight[1,])
#EXAMPLE 2: DATASET MODELLING
#--------------------------------------------------------
#Antropometric data
FatFree <- c(32, 17.2, 18.8, 20, 24.1)
Fat <- c(4.30, 2.02, 3.07, 1.12, 2.93)
ages <- c(10, 6.2, 5.4, 4, 4.1)
sexes <- c("male", "female", "female", "male", "male")
#With specific energy intake
eintake <- matrix(rep(2000, 365*5), ncol = 5)
#Returns a weight change matrix and other matrices
model_weight <- child_weight(ages, sexes, Fat, FatFree, eintake)
model_weight_2 <- child_weight(ages, sexes, Fat, FatFree,
richardsonparams = list(K = 2700, Q = 10,
B = 12, A = 3, nu = 4, C = 1))
# }
Run the code above in your browser using DataLab