Rayt Chiruka
2019-Mar-19 14:49 UTC
[R] Obtaining individual parameters from a sitar growth model.
I want to obtain the individual biological parameters (ie age at takeoff, final height velocity at takeoff) after a sitar model. (I do understand a sitar model fits a mean curve for the population). I have managed to obtain the parameters for one individual using the code below, library(sitar) data(heights) library(tidyverse) m1 <- sitar(x=age, y=height, id=id, data=heights, df=5) #velocity at takeoff for individual 1 (vel_attoff<-getPeakTrough(plot_v(m1, subset=age < 14 & id==1) , peak=FALSE)) What I want is to produce a dataframe with the id and the velocity at takeoff for each individual in the dataset. I have tried to do this for (i in seq_along(heights[1])){ print(getPeakTrough(plot_v(m1, subset=age < 14 & id==i) , peak=FALSE)) } But it prints only one x and y value Any assistance will be greatly appreciated. -- R T CHIRUKA University of Fort Hare Statistics Department Box X 1314 Alice 5700 South Africa [[alternative HTML version deleted]]