Learn R Programming

capn (version 2.0.0)

vaprox: Computing Value Function (V) Approximation Coefficients

Description

Computes Chebyshev polynomial coefficients for approximating the value function \(V(s)\) over a bounded state space. The function supports multi-dimensional deterministic and stochastic dynamic optimization problems within the natural capital asset pricing (CAPN) framework.

Usage

vaprox(aproxspace, stock, sdot, w, covmat = NULL)

Value

A list containing the approximation results:

  • degree: Degree of the Chebyshev polynomial in each dimension.

  • lowerB: Lower bounds of the approximation domain.

  • upperB: Upper bounds of the approximation domain.

  • delta: Discount rate.

  • coefficient: Estimated Chebyshev polynomial coefficients.

  • model.type: Either "deterministic" or "stochastic".

Arguments

aproxspace

An approximation space defined by the aproxdef function.

stock

A vector or matrix of stock states \(s\). For multi-dimensional problems, each column corresponds to one state variable.

sdot

A vector or matrix of stock dynamics \(\dot{s} = ds/dt\) (deterministic case) or drift terms \(\mu(s)\) (stochastic case), with the same dimension as stock.

w

A vector of net benefits (profits or economic program values), \(W(s)\).

covmat

An optional variance–covariance matrix of the state dynamics. Columns must correspond to the unique \((i,j)\) combinations of state variables. Set to NULL for deterministic problems.

Details

The V-approximation solves for the value function \(V(s)\) from the Hamilton--Jacobi--Bellman equation.

Deterministic case: $$ \delta V(s) = W(s) + p(s) \dot{s} $$

Stochastic case: $$ \delta V(s) = W(s) + p(s)\mu(s) + \frac{1}{2} \sigma^{2}(s) p_{s}(s) $$

where \(\delta\) is the discount rate, \(W(s)\) denotes net benefits, \(p(s) = \partial V(s) / \partial s\) is the shadow (accounting) price, \(\mu(s)\) is the drift term, and \(\sigma^{2}(s)\) is the variance of the stochastic process.

The value function is approximated as $$ V(s) = \Phi(s) \boldsymbol{\beta}, $$ where \(\Phi(s)\) denotes the Chebyshev basis evaluated at \(s\) and \(\boldsymbol{\beta}\) is the vector of unknown coefficients.

Substituting this approximation into the HJB equation yields a linear system:
Deterministic: $$ \delta \Phi(s)\boldsymbol{\beta} = W(s) + \mathrm{diag}(\dot{s}) \Phi_{s}(s)\boldsymbol{\beta} $$

Stochastic: $$ \delta \Phi(s)\boldsymbol{\beta} = W(s) + \mathrm{diag}(\mu(s)) \Phi_{s}(s)\boldsymbol{\beta} + \frac{1}{2} \sigma^{2}(s)\Phi_{ss}(s)\boldsymbol{\beta} $$

In exactly identified cases, the system is solved directly. In over-determined cases (more nodes than basis terms), the coefficients are obtained via least squares: $$ \boldsymbol{\beta} = (A^{\top}A)^{-1} A^{\top} W, $$ where \(A\) collects the terms multiplying \(\boldsymbol{\beta}\).

The formulation extends naturally to multi-dimensional state spaces using tensor products of Chebyshev bases.

References

Abbott, Joshua K., Eli P. Fenichel, and Seong D. Yun. (2026). Risky (Natural) Assets: Stochasticity, Nonconvexity, and the Value of Natural Capital. Journal of the Association of Environmental and Resource Economists, 13(5), 1269-1309. tools:::Rd_expr_doi("10.1086/741689")

Fenichel, Eli P. and Joshua K. Abbott. (2014). Natural Capital: From Metaphor to Measurement. Journal of the Association of Environmental Economists, 1(1/2), 1--27. tools:::Rd_expr_doi("10.1086/676034")

Yun, Seong D., Barbara Hutniczak, Joshua K. Abbott, and Eli P. Fenichel. (2017). Ecosystem-Based Management and the Wealth of Ecosystems. Proceedings of the National Academy of Sciences, 114(25), 6539--6544. tools:::Rd_expr_doi("10.1073/pnas.1617666114")

See Also

aproxdef, vsim, GOM, LV, AFY

Examples

Run this code
## 1-D Deterministic: Reef-fish example (Fenichel and Abbott, 2014)
data("GOM")

param <- GOM$param
simData <- GOM$simData

Aspace <- aproxdef(param$order, param$lowerK, param$upperK, param$delta)

vC <- vaprox(
  Aspace,
  simData$stock,
  simData$sdot,
  simData$profit
)

## 2-D Deterministic: Prey--Predator example
data("LV")

lvspace <- aproxdef(
  deg = c(20, 20),
  lb = c(0.1, 0.1),
  ub = c(1.5, 1.5),
  delta  = 0.03
)

vCLV <- vaprox(
  lvspace,
  LV$lvaproxdata[, c("xs", "ys")],
  LV$lvaproxdata[, c("xdot", "ydot")],
  LV$lvaproxdata[, "wval"]
)

## 1-D Stochastic: Pindyck (1984) extension (Abbott et al., 2026)
data("AFY")

Aspace <- aproxdef(35, 0.2, 1.4, 0.05)

## deterministic
vCd <- vaprox(
  Aspace,
  AFY$simData$stock,
  AFY$simData$mus.d,
  AFY$simData$profit.d
)

## stochastic
vCs <- vaprox(
  Aspace,
  AFY$simData$stock,
  AFY$simData$mus.s,
  AFY$simData$profit.s,
  AFY$simData$sigs
)

Run the code above in your browser using DataLab