R/model_using_split_times.R
model_using_split_times_with_time_correction.Rd
This function models the sprint split times using mono-exponential equation that estimates
maximum sprinting speed (MSS
), relative acceleration (TAU
) and time_correction
.
time
is used as target or outcome variable, and distance
as predictor.
model_using_split_times_with_time_correction( distance, time, weights = 1, na.rm = FALSE, ... )
distance | Numeric vector |
---|---|
time | Numeric vector |
weights | Numeric vector. Default is vector of 1
This is used to give more weight to particular observations. For example, use |
na.rm | Logical. Default is FALSE |
... | Forwarded to |
List object with the following elements:
List with the following estimated parameters:
MSS
, TAU
, MAC
, PMAX
, and time_correction
List with the following components:
RSE
, R_squared
, minErr
, maxErr
, and RMSE
Model returned by the nls
function
Data frame used to estimate the sprint parameters, consisting of distance
,
time
, weights
,and pred_time
columns
split_times <- data.frame( distance = c(5, 10, 20, 30, 35), time = c(1.21, 1.99, 3.38, 4.71, 5.30) ) sprint_model <- with( split_times, model_using_split_times_with_time_correction(distance, time) ) sprint_model$parameters#> $MSS #> [1] 7.927337 #> #> $TAU #> [1] 1.187946 #> #> $MAC #> [1] 6.673144 #> #> $PMAX #> [1] 13.22507 #> #> $time_correction #> [1] 0.2724719 #>