R/model_using_split_times.R
model_using_split_times_with_corrections.Rd
This function models the sprint split times using mono-exponential equation that estimates
maximum sprinting speed (MSS
), relative acceleration (TAU
), time_correction
,
and distance_correcion
. time
is used as target or outcome variable, and distance
as predictor.
model_using_split_times_with_corrections( 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
, time_correction
, and
distance_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.20, 1.96, 3.36, 4.71, 5.35) ) sprint_model <- with( split_times, model_using_split_times_with_corrections(distance, time) ) sprint_model$parameters#> $MSS #> [1] 8.070141 #> #> $TAU #> [1] 2.68424 #> #> $MAC #> [1] 3.00649 #> #> $PMAX #> [1] 6.065701 #> #> $time_correction #> [1] 3.038271 #> #> $distance_correction #> [1] 12.01549 #>