Description Usage Arguments Details Value
View source: R/AUC_Spline_matrix_B.R
In the area under the curve calculation using the spline interpolation method, the vector of the second derivative of the outcome of interest \mjseqnY is expressed as \mjseqnA Y^” = B Y + F. This function calculate calculate the matrix B.
1 |
time |
a numerical vector of time points of length m (x-axis coordinates). |
The tridiagonal matrix \mjteqnBBB is defined as (for the "not-a-knot boundary conditions): The \mjteqnjjjth line of the matrix, \mjteqnB_[j,\ :]B_[j,\ :]B_[j,\ :] is given by \mjtdeqnB_[j,\ :] = \left(0, \cdots, 0\right) \ if \ j=1B_[j,\ :] = \left(0, \cdots, 0\right) \ if \ j=1B_[j,\ :] = \left(0, \cdots, 0\right) \ if \ j=1 \mjtdeqnB_[j,\ :] = \left(0, \cdots, 0\right) \ if \ j=mB_[j,\ :] = \left(0, \cdots, 0\right) \ if \ j=mB_[j,\ :] = \left(0, \cdots, 0\right) \ if \ j=m \mjtdeqnB_[j,\ :] = \left(0_1, \cdots, 0_j-2, \frac1h_j,-\left[\frac1h_j + \frac1h_j+1\right], \frac1h_j+1, 0_j+2, \cdots, 0_m \right) \ otherwise B_[j,\ :] = \left(0_1, \cdots, 0_j-2, \frac1h_j,-\left[\frac1h_j + \frac1h_j+1\right], \frac1h_j+1, 0_j+2, \cdots, 0_m \right) \ otherwise B_[j,\ :] = \left(0_1, \cdots, 0_j-2, \frac1h_j,-\left[\frac1h_j + \frac1h_j+1\right], \frac1h_j+1, 0_j+2, \cdots, 0_m \right) \ otherwise
a tridiagonal matrix corresponding to the weights of the variable of interest in the spline interpolation method. In this version, the matrix is build considering the "not-a-knot" spline boundary conditions.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.