Calculate the weight for sparse AUC calculation with the linear-trapezoidal rule
Source:R/sparse.R
sparse_auc_weight_linear.Rd
The weight is used as the \(w_i\) parameter in pk.calc.sparse_auc()
Arguments
- sparse_pk
A sparse_pk object from
as_sparse_pk()
Details
$$w_i = \frac{\delta_{time,i-1,i} + \delta_{time,i,i+1}}{2}$$ $$\delta_{time,i,i+1} = t_{i+1} - t_i$$
Where:
- \(w_i\)
is the weight at time i
- \(\delta_{time,i-1,i}\) and \(\delta_{time,i,i+1}\)
are the changes between time i-1 and i or i and i+1 (zero outside of the time range)
- \(t_i\)
is the time at time i
See also
Other Sparse Methods:
as_sparse_pk()
,
pk.calc.sparse_auc()
,
sparse_mean()