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]]

______________________________________________

[hidden email] mailing list -- To UNSUBSCRIBE and more, see

https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide

http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.