get_traj_velocity: Returns the veclocity of growth trajectories for _all_...

Description Usage Arguments Value

View source: R/analysis_avg_vel.R

Description

Returns the veclocity of growth trajectories for _all_ subjects

Usage

1
2
get_traj_velocity(all_traj, z_score = TRUE, agedays_floor = 0,
  agedays_limit = 365, FUN = mean_na_rm_generator())

Arguments

all_traj

Trajectory object returned from fit_all_trajectories. Assumes all required data are present.

z_score

Boolean indicating whether 'y_var' parameter was for z-score data or not. Default is TRUE.

agedays_floor

Numeric, indicating the _floor_ (or start of range) of the number of 'agedays' (inclusive) associated with the derivative of the trajectories, to which the function in 'FUN' argument should apply to. Default is 0. Note, this parameter depends on the the number of grid points used to generate the trajectories, which is specified by the xg parameter for the functions hbgd::fit_trajectory and hbgd::fit_all_trajectories.

agedays_limit

Numeric, indicating the _ceiling_ (or end of range) of the number of 'agedays' (inclusive) associated with the derivative of the trajectories, to which the function in 'FUN' argument should apply to. Default is 365. Note, this parameter depends on the the number of grid points used to generate the trajectories, which is specified by the xg parameter for the functions hbgd::fit_trajectory and hbgd::fit_all_trajectories.

FUN

A function that will be applied to the first derivative of the fitted growth trajectory. This function should accept a single argument; a vector containing the values of the first derivative. Default value is a _https://en.wikipedia.org/wiki/Currying_ version of the mean function, which removes NA values by default.

Value

A tibble with two columns, subjid and avg_vel


hafen/hbgd documentation built on March 1, 2020, 5:31 p.m.