Description Usage Arguments Details Value
View source: R/AUC_Spline_matrix_A.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 A.
1 |
time |
a numerical vector of time points of length m (x-axis coordinates). |
The tridiagonal matrix \mjteqnAAA is defined as (for the "not-a-knot boundary conditions): The \mjteqnjjjth line of the matrix, \mjteqnA_[j,\ :]A_[j,\ :]A_[j,\ :] is given by \mjtdeqnA_[j,\ :] = \left(\frac1h_2,-\left[\frac1h_2 + \frac1h_3\right], \frac1h_3, 0, \cdots, 0 \right) \ if \ j=1A_[j,\ :] = \left(\frac1h_2,-\left[\frac1h_2 + \frac1h_3\right], \frac1h_3, 0, \cdots, 0 \right) \ if \ j=1A_[j,\ :] = \left(\frac1h_2,-\left[\frac1h_2 + \frac1h_3\right], \frac1h_3, 0, \cdots, 0 \right) \ if \ j=1 \mjtdeqnA_[j,\ :] = \left(0, \cdots, 0, \frac1h_m-1,-\left[\frac1h_m-1 + \frac1h_m\right], \frac1h_m \right) \ if \ j=mA_[j,\ :] = \left(0, \cdots, 0, \frac1h_m-1,-\left[\frac1h_m-1 + \frac1h_m\right], \frac1h_m \right) \ if \ j=mA_[j,\ :] = \left(0, \cdots, 0, \frac1h_m-1,-\left[\frac1h_m-1 + \frac1h_m\right], \frac1h_m \right) \ if \ j=m \mjtdeqnA_[j,\ :] = \left(0_1, \cdots, 0_j-2, \frach_j6,\frach_j+h_j+13, \frach_j+16, 0_j+2, \cdots, 0_m \right) \ otherwiseA_[j,\ :] = \left(0_1, \cdots, 0_j-2, \frach_j6,\frach_j+h_j+13, \frach_j+16, 0_j+2, \cdots, 0_m \right) \ otherwiseA_[j,\ :] = \left(0_1, \cdots, 0_j-2, \frach_j6,\frach_j+h_j+13, \frach_j+16, 0_j+2, \cdots, 0_m \right) \ otherwise
a tridiagonal matrix corresponding to the weights of the second derivative 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.