Compute nrow
-th function value using x(nrow, j) + delta(nrow, j) + stp
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
procedure(fcn_t) | :: | fcn |
User-supplied subroutine for evaluating the model. |
|||
integer, | intent(in) | :: | n |
Number of observations. |
||
integer, | intent(in) | :: | m |
Number of columns of data in the independent variable. |
||
integer, | intent(in) | :: | np |
Number of function parameters. |
||
integer, | intent(in) | :: | q |
Number of responses per observation. |
||
real(kind=wp), | intent(in) | :: | beta(np) |
Function parameters. |
||
real(kind=wp), | intent(inout) | :: | xplusd(n,m) |
Values of |
||
integer, | intent(in) | :: | ifixb(np) |
Values designating whether the elements of |
||
integer, | intent(in) | :: | ifixx(ldifx,m) |
Values designating whether the elements of |
||
integer, | intent(in) | :: | ldifx |
Leading dimension of array |
||
integer, | intent(in) | :: | nrow |
Row number of the independent variable array at which the derivative is to be checked. |
||
integer, | intent(in) | :: | j |
Index of the partial derivative being examined. |
||
integer, | intent(in) | :: | lq |
Response currently being examined. |
||
real(kind=wp), | intent(in) | :: | stp |
Step size for the finite difference derivative. |
||
integer, | intent(out) | :: | istop |
Variable designating whether there are problems computing the function at the
current |
||
integer, | intent(inout) | :: | nfev |
Number of function evaluations. |
||
real(kind=wp), | intent(out) | :: | pvd |
Function value for the selected observation & response. |
||
real(kind=wp), | intent(out) | :: | fjacd(n,m,q) |
Jacobian wrt delta. |
||
real(kind=wp), | intent(out) | :: | f(n,q) |
Predicted function values. |
||
real(kind=wp), | intent(out) | :: | fjacb(n,np,q) |
Jocobian wrt beta. |
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
real(kind=wp), | public | :: | xpdj |
subroutine fpvd & (fcn, & n, m, np, q, & beta, xplusd, ifixb, ifixx, ldifx, & nrow, j, lq, stp, & istop, nfev, pvd, & fjacd, f, fjacb) !! Compute `nrow`-th function value using `x(nrow, j) + delta(nrow, j) + stp`. procedure(fcn_t) :: fcn !! User-supplied subroutine for evaluating the model. integer, intent(in) :: n !! Number of observations. integer, intent(in) :: m !! Number of columns of data in the independent variable. integer, intent(in) :: np !! Number of function parameters. integer, intent(in) :: q !! Number of responses per observation. real(wp), intent(in) :: beta(np) !! Function parameters. real(wp), intent(inout) :: xplusd(n, m) !! Values of `x + delta`. integer, intent(in) :: ifixb(np) !! Values designating whether the elements of `beta` are fixed at their input values or not. integer, intent(in) :: ifixx(ldifx, m) !! Values designating whether the elements of `x` are fixed at their input values or not. integer, intent(in) :: ldifx !! Leading dimension of array `ifixx`. integer, intent(in) :: nrow !! Row number of the independent variable array at which the derivative is to be checked. integer, intent(in) :: j !! Index of the partial derivative being examined. integer, intent(in) :: lq !! Response currently being examined. real(wp), intent(in) :: stp !! Step size for the finite difference derivative. integer, intent(out) :: istop !! Variable designating whether there are problems computing the function at the !! current `beta` and `delta`. integer, intent(inout) :: nfev !! Number of function evaluations. real(wp), intent(out) :: pvd !! Function value for the selected observation & response. real(wp), intent(out) :: fjacd(n, m, q) !! Jacobian wrt delta. real(wp), intent(out) :: f(n, q) !! Predicted function values. real(wp), intent(out) :: fjacb(n, np, q) !! Jocobian wrt beta. ! Local scalars real(wp) :: xpdj ! Variable Definitions (alphabetically) ! XPDJ: The (NROW,J)th element of XPLUSD. xpdj = xplusd(nrow, j) xplusd(nrow, j) = xplusd(nrow, j) + stp istop = 0 call fcn(beta, xplusd, ifixb, ifixx, 003, f, fjacb, fjacd, istop) if (istop == 0) then nfev = nfev + 1 else return end if xplusd(nrow, j) = xpdj pvd = f(nrow, lq) end subroutine fpvd