| Title: | Capital Asset Pricing for Nature |
|---|---|
| Description: | Implements the natural capital asset pricing for nature (CAPN) approach, using a collocation or iteration method and associated functions for dynamic programs. Development of this package was supported by the Knobloch Family Foundation and Lenfest Ocean Program Contract ID 00029728. |
| Authors: | Seong D. Yun [aut, cre], Eli P. Fenichel [aut, ctb], Joshua K. Abbott [aut, ctb] |
| Maintainer: | Seong D. Yun <[email protected]> |
| License: | GPL (>= 2) |
| Version: | 2.0.0 |
| Built: | 2026-09-21 09:57:06 UTC |
| Source: | https://github.com/cran/capn |
AFY contains approximation and simulation data used to replicate the
one-dimensional stochastic example in Abbott, Fenichel, and Yun (2026),
which extends the classic renewable resource model of Pindyck (1984).
The dataset illustrates the natural capital asset pricing (CAPN) framework
under uncertainty.
data("AFY")data("AFY")
A data.frame containing simulation and approximation data for a one-dimensional stochastic renewable resource model:
A data.frame with the following components:
stock: Stock levels.
mu.d: Deterministic stock growth rate.
profit.d: Deterministic profit.
mu.s: Drift term of the stochastic stock process.
profit.s: Profit under stochastic dynamics.
sigs: Variance term of the stochastic process.
A data.frame of model and approximation parameters:
r: Intrinsic growth rate (=0.5)
K: Carrying capacity (=100)
b: Demand parameter (=1)
eta: elasticity of demand (=1/2)
c: cost parameter (=5)
gamma: elasticity of marginal cost (=2)
delta: discount rate (=0.05)
order: Chebyshev polynomial order (=30)
upperK: Upper bound of Chebyshev nodes (= 114.3)
lowerK: Lower bound of Chebyshev nodes (= 20)
nodes: Number of Chebyshev nodes (= 30)
Following Abbott, Fenichel, and Yun (2026) and Pindyck (1984), the model is defined as follows.
Demand function:
Cost function:
Biological growth function:
Stock dynamics:
Net benefit function:
Closed-form value function:
where
Optimal harvest (catch) function:
Parameter values:
(=100% in the percentage replication)
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.
doi:10.1086/741689
Pindyck, Robert S. (1984). Uncertainty in the Theory of Renewable Resource Markets. Review of Economic Studies, 51(2), 289–303. doi:10.2307/2297693
Define an approximation space for the value function and price function approximation methods
(V, P, and Pdot).
aproxdef(deg, lb, ub, delta)aproxdef(deg, lb, ub, delta)
deg |
A vector specifying the number of polynomials (degrees of Chebyshev polynomials) in each dimension. |
lb |
A vector of lower bounds for each dimension. |
ub |
A vector of upper bounds for each dimension. |
delta |
A numeric scalar specifying the discount rate. |
For the -th dimension, , suppose a polynomial approximant
over a bounded interval is defined using Chebyshev polynomials.
Then, a -dimensional approximation domain is defined as:
Suppose Chebyshev polynomials (i.e., degree ) are used for the -th dimension.
The approximation space is defined by:deg = c(),lb = c(), andub = c().
The argument delta is the constant discount rate used in the approximation.
A list defining the approximation space, containing polynomial degrees, bounds, and discount rate.
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. doi:10.1086/676034
## Reef-fish example: see Fenichel and Abbott (2014) delta <- 0.02 # discount rate upper <- 359016000 # upper bound on approximation space lower <- 5e+6 # lower bound on approximation space myspace <- aproxdef(50, lower, upper, delta) ## Two-dimensional example ub <- c(1.5, 1.5) lb <- c(0.1, 0.1) deg <- c(20, 20) delta <- 0.03 myspace <- aproxdef(deg, lb, ub, delta)## Reef-fish example: see Fenichel and Abbott (2014) delta <- 0.02 # discount rate upper <- 359016000 # upper bound on approximation space lower <- 5e+6 # lower bound on approximation space myspace <- aproxdef(50, lower, upper, delta) ## Two-dimensional example ub <- c(1.5, 1.5) lb <- c(0.1, 0.1) deg <- c(20, 20) delta <- 0.03 myspace <- aproxdef(deg, lb, ub, delta)
Compute the monomial basis of Chebyshev polynomials for given unidimensional nodes
over a bounded interval .
chebbasisgen(nodes, npol, a, b, dorder = NULL)chebbasisgen(nodes, npol, a, b, dorder = NULL)
nodes |
A numeric vector of Chebyshev nodes |
npol |
An integer specifying the number of polynomials
( |
a |
The lower bound of the interval |
b |
The upper bound of the interval |
dorder |
Order of the partial derivative of the basis.
The default |
Suppose there are Chebyshev nodes over a bounded interval : for .
These nodes are normalized to the standard Chebyshev domain as:.
With normalized Chebyshev nodes, the recurrence relations for Chebyshev polynomials are:,, and.
The interpolation (Vandermonde) matrix of Chebyshev polynomials of degree up to
with nodes, , is:.
Derivatives of the basis are computed using the identity:
Further technical details on Chebyshev polynomial bases can be found in
Amparo et al. (2007) and Miranda and Fackler (2002).
A numeric matrix of dimension , where is the number of nodes
and , containing the Chebyshev polynomial basis (Vandermonde matrix)
or its derivatives.
Amparo, Gil, Javier Segura, and Nico Temme (2007).
Numerical Methods for Special Functions.
Cambridge: Cambridge University Press.
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.
doi:10.1086/676034
Miranda, Mario J. and Paul L. Fackler (2002). Applied Computational Economics and Finance. Cambridge: MIT Press.
## Reef-fish example: see Fenichel and Abbott (2014) data("GOM") param <- GOM$param nodes <- chebnodegen( param$nodes, param$lowerK, param$upperK ) ## Chebyshev polynomial basis chebbasisgen(nodes, 20, 0.1, 1.5) ## First derivative of the Chebyshev polynomial basis chebbasisgen(nodes, 20, 0.1, 1.5, dorder = 1)## Reef-fish example: see Fenichel and Abbott (2014) data("GOM") param <- GOM$param nodes <- chebnodegen( param$nodes, param$lowerK, param$upperK ) ## Chebyshev polynomial basis chebbasisgen(nodes, 20, 0.1, 1.5) ## First derivative of the Chebyshev polynomial basis chebbasisgen(nodes, 20, 0.1, 1.5, dorder = 1)
Generate a multi-dimensional Chebyshev grid over bounded intervals.
chebgrids(nnodes, lb, ub, rtype = NULL)chebgrids(nnodes, lb, ub, rtype = NULL)
nnodes |
A vector specifying the number of nodes in each dimension. |
lb |
A vector of lower bounds for each dimension. |
ub |
A vector of upper bounds for each dimension. |
rtype |
Type of return value. The default |
For the -th dimension, , suppose a polynomial approximant
over a bounded interval is defined using Chebyshev nodes.
Then, a -dimensional Chebyshev grid is defined as:
This corresponds to all combinations of the marginal Chebyshev grids .
Two types of return values are provided.
rtype = "list" returns a list of length containing the marginal grids,
whereas rtype = "grid" returns a
matrix of all grid points.
A list with elements of Chebyshev nodes, or a
matrix of Chebyshev grid points.
## Chebyshev grid with two dimensions chebgrids(c(5, 3), c(1, 1), c(2, 3)) ## Returns the same result explicitly as a list chebgrids(c(5, 3), c(1, 1), c(2, 3), rtype = "list") ## Returns a matrix of grid points over the same domain chebgrids(c(5, 3), c(1, 1), c(2, 3), rtype = "grid") ## Chebyshev grid with one dimension chebgrids(5, 1, 2) chebnodegen(5, 1, 2) ## Chebyshev grid with three dimensions chebgrids(c(3, 4, 5), c(1, 1, 1), c(2, 3, 4), rtype = "grid")## Chebyshev grid with two dimensions chebgrids(c(5, 3), c(1, 1), c(2, 3)) ## Returns the same result explicitly as a list chebgrids(c(5, 3), c(1, 1), c(2, 3), rtype = "list") ## Returns a matrix of grid points over the same domain chebgrids(c(5, 3), c(1, 1), c(2, 3), rtype = "grid") ## Chebyshev grid with one dimension chebgrids(5, 1, 2) chebnodegen(5, 1, 2) ## Chebyshev grid with three dimensions chebgrids(c(3, 4, 5), c(1, 1, 1), c(2, 3, 4), rtype = "grid")
Generate unidimensional Chebyshev nodes over a bounded interval.
chebnodegen(n, a, b)chebnodegen(n, a, b)
n |
An integer specifying the number of nodes. |
a |
The lower bound of the interval |
b |
The upper bound of the interval |
A polynomial approximant over a bounded interval is constructed using Chebyshev nodes as:
for .
Further details can be found in Miranda and Fackler (2002, p.~119).
A numeric vector of length containing Chebyshev nodes.
Miranda, Mario J. and Paul L. Fackler (2002). Applied Computational Economics and Finance. Cambridge: MIT Press.
## 10 Chebyshev nodes in [-1, 1] chebnodegen(10, -1, 1) ## 5 Chebyshev nodes in [1, 5] chebnodegen(5, 1, 5)## 10 Chebyshev nodes in [-1, 1] chebnodegen(10, -1, 1) ## 5 Chebyshev nodes in [1, 5] chebnodegen(5, 1, 5)
forest contains parameters and simulated data used to replicate the
Douglas-fir forest in Western Oregon example (industrial siteclass 3) from Hashida and Fenichel (2022).
The dataset illustrates the natural capital asset pricing (CAPN)
framework in a one-dimensional deterministic setting.
See vignette("forestDemo") for an example demonstrating the use of this data.
data("forest")data("forest")
A list with two elements:
A data.frame of model and approximation parameters:
delta: Discount rate (= 0.07)
order: Chebyshev polynomial order (= 400)
lowerK: lower bound of Chebyshev nodes (= 1)
upperK: Upper bound of Chebyshev nodes (= 80)
nodes: Number of Chebyshev nodes (= 400)
crit.vol: Boundary (Moratorium or Maximum Standing) Volume (= 18.6592)
margp: Marginal use value at crit.vol (= 743.439)
splittime: Split time at crit.vol (= 57.21486)
A data.frame of simulated values evaluated at approximation nodes:
vol: Forest volume (MBF) at Chevyshev nodes in [1,80]
growth: Evaluated stock dynamics at vol
profit: Profit evaluated at vol
times: Evaluated time with at vol
See Hashida and Fenichel (2022).
Hashida, Yukiko and Eli P. Fenichel. (2022). Valuing Natural Capital When Management Is Dominated by Periods of Inaction. American Journal of Agricultural Economics, 104(2), 791–811. doi:10.1111/ajae.12250
GOM contains parameters and simulated data used to replicate the
Gulf of Mexico reef fish example from Fenichel and Abbott (2014).
The dataset illustrates the natural capital asset pricing (CAPN)
framework in a one-dimensional deterministic setting.
data("GOM")data("GOM")
A list with two elements:
A data.frame of model and approximation parameters:
r: Intrinsic growth rate (= 0.3847)
k: Carrying capacity (= 359016000)
q: Catchability coefficient (= 0.00031729344157311126)
price: Output price (= 2.70)
cost: Unit cost (= 153.0)
alpha: Technology parameter (= 0.5436459179063678)
gamma: Pre-ITQ management parameter (= 0.7882)
y: System equivalence parameter (= 0.15745573410462155)
delta: Discount rate (= 0.02)
order: Chebyshev polynomial order (= 50)
upperK: Upper bound of Chebyshev nodes (= k)
lowerK: Lower bound of Chebyshev nodes (= )
nodes: Number of Chebyshev nodes (= 50)
A data.frame of simulated values evaluated at approximation nodes:
stock: Approximation nodes
profit: Profit evaluated at stock
sdot: Evaluated stock dynamics
dsdotds: Evaluated
dsdotdss: Evaluated
dwds: Evaluated
dwdss: Evaluated
From Fenichel and Abboott(2014),
catch effort: ,
harvest: ,
profit: , and
sdot: .
The biological parameters are:
: Intrinsic growth rate
: Carrying capacity
The economic parameters are:
: Catchability coefficient
: Output price
: Unit cost
: Technology parameter
: Pre-ITQ management parameter
: System equivalence parameter
: Discount rate
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. doi:10.1086/676034
LV contains simulated data for a prey–predator (Lotka–Volterra)
bioeconomic model used to illustrate multi-dimensional natural capital
asset pricing (CAPN) methods.
This example corresponds to a two-dimensional deterministic setting.
The dataset includes both approximation data on a Chebyshev grid and
time-series simulation output from the underlying dynamic system.
See vignette("LVDemo") for an example demonstrating the use of this data.
data("LV")data("LV")
A list with two elements:
A data.frame of approximation data evaluated on a
Chebyshev grid:
xs: Prey stock
ys: Predator stock
xdot: Evaluated prey dynamics
ydot: Evaluated predator dynamics
wval: Profit (objective value in Fenichel and Abbott (2014))
A data.frame of time-series simulation output from solving the ODE system:
tseq: Time sequence from 0 to 100
xs: Prey stock
ys: Predator stock
The prey–predator system is given by:
Prey ():
Predator ():
The biological parameters are:
: Intrinsic growth rate of prey
: Carrying capacity of prey
: Predation effect on prey
: Prey-to-predator conversion parameter
: Natural mortality rate of predator
: Predator harvest control slope
: Prey harvest control slope
The economic objective is defined as:
The economic parameters are:
: Price per unit harvest of predator
: Price per unit harvest of prey
:
Cost per unit of prey effort (Schaefer model, with )
:
Cost per unit of predator effort (Schaefer model, with )
Computes the P-approximation coefficients for the shadow price function using
Chebyshev polynomial approximation as defined by aproxdef.
Currently, only the one-dimensional deterministic case is supported.
paprox(aproxspace, stock, sdot, dsdotds, dwds)paprox(aproxspace, stock, sdot, dsdotds, dwds)
aproxspace |
An approximation space defined by the |
stock |
A vector or array of stock values, |
sdot |
A vector or array of stock dynamics, |
dsdotds |
A vector or array of derivatives of stock dynamics with respect to stock,
|
dwds |
A vector or array of marginal value of the flow payoff with respect to stock,
|
The P-approximation solves for the shadow price of a stock, , from:
,
where , ,
, and is the discount rate.
The shadow price function is approximated as:
,
where is a vector of Chebyshev basis functions and
is the vector of unknown coefficients.
Using the chain rule and Chebyshev basis properties:
.
Substituting into the pricing equation yields:
.
In the over-determined case (more nodes than approximation degrees), the function
uses a least-squares solution:
where:
See Fenichel et al. (2016) for additional theoretical background.
A list containing the P-approximation results. Components can be accessed using
results$item or results[["item"]]. The list includes:
degree |
Degree of the Chebyshev polynomial approximation. |
lowerB |
Lower bound of the approximation domain. |
upperB |
Upper bound of the approximation domain. |
delta |
Discount rate. |
coefficient |
Estimated Chebyshev polynomial coefficients for the shadow price function. |
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.
doi:10.1086/676034
Fenichel, Eli P., Joshua K. Abbott, Jude Bayham, Whitney Boone, Erin M. K. Haacker, and Lisa Pfeiffer. (2016) Measuring the Value of Groundwater and Other Forms of Natural Capital. Proceedings of the National Academy of Sciences. 113: 2382–2387. doi:10.1073/pnas.1513779113
## 1-D Reef-fish example: see Fenichel and Abbott (2014) data("GOM") param <- GOM$param simData <- GOM$simData Aspace <- aproxdef(param$order, param$lowerK, param$upperK, param$delta) pC <- paprox( Aspace, simData$stock, simData$sdot, simData$dsdotds, simData$dwds )## 1-D Reef-fish example: see Fenichel and Abbott (2014) data("GOM") param <- GOM$param simData <- GOM$simData Aspace <- aproxdef(param$order, param$lowerK, param$upperK, param$delta) pC <- paprox( Aspace, simData$stock, simData$sdot, simData$dsdotds, simData$dwds )
Computes Pdot-approximation coefficients for the Chebyshev polynomial
representation of the shadow price derivative using the approximation
space defined by aproxdef.
Currently, only the one-dimensional case is supported.
pdotaprox(aproxspace, stock, sdot, dsdotds, dsdotdss, dwds, dwdss)pdotaprox(aproxspace, stock, sdot, dsdotds, dsdotdss, dwds, dwdss)
aproxspace |
An approximation space defined by the |
stock |
A vector of stock values, |
sdot |
A vector of stock growth rates,
|
dsdotds |
A vector of derivatives of stock growth with respect to stock,
|
dsdotdss |
A vector of second derivatives of stock growth with respect to stock,
|
dwds |
A vector of marginal welfare with respect to stock,
|
dwdss |
A vector of second derivatives of marginal welfare with respect to stock,
|
The Pdot-approximation solves for the shadow price of a stock, ,
using the relationship:
,
where ,
,
,
and is the discount rate.
Taking the time derivative of this expression yields:
.
Let the approximation be
,
where is a vector of Chebyshev basis functions and
is the coefficient vector.
Then,
.
Substituting and rearranging yields the linear system:
where
and
In the over-determined case, coefficients are obtained via least squares:
For additional theoretical background, see Fenichel and Abbott (2014).
A list containing the approximation results. Individual elements can be accessed
using results$item or results[["item"]]. The list includes:
degree |
Degree of the Chebyshev polynomial. |
lowerB |
Lower bound of the Chebyshev domain. |
upperB |
Upper bound of the Chebyshev domain. |
delta |
Discount rate. |
coefficient |
Estimated Chebyshev polynomial coefficients. |
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. doi:10.1086/676034
## 1-D Reef-fish example: see Fenichel and Abbott (2014) data("GOM") param <- GOM$param simData <- GOM$simData Aspace <- aproxdef(param$order, param$lowerK, param$upperK, param$delta) pdotC <- pdotaprox( Aspace, simData$stock, simData$sdot, simData$dsdotds, simData$dsdotdss, simData$dwds, simData$dwdss )## 1-D Reef-fish example: see Fenichel and Abbott (2014) data("GOM") param <- GOM$param simData <- GOM$simData Aspace <- aproxdef(param$order, param$lowerK, param$upperK, param$delta) pdotC <- pdotaprox( Aspace, simData$stock, simData$sdot, simData$dsdotds, simData$dsdotdss, simData$dwds, simData$dwdss )
Simulates shadow prices and value functions using coefficients from
the Pdot-approximation obtained via pdotaprox.
pdotsim(pdotcoeff, stock, sdot, dsdotds, wval, dwds)pdotsim(pdotcoeff, stock, sdot, dsdotds, wval, dwds)
pdotcoeff |
An approximation result from the |
stock |
A numeric vector of stock values, |
sdot |
A numeric vector of stock growth rates,
|
dsdotds |
A numeric vector of derivatives of stock growth with respect
to stock, |
wval |
A numeric vector of |
dwds |
A numeric vector of marginal |
Let denote the vector of approximation coefficients
from pdotaprox. Over the approximation interval
, the estimated shadow (accounting) price is given by:
.
The corresponding estimated value function is:
.
These expressions follow directly from the Pdot-approximation framework
developed in Fenichel and Abbott (2014) and Fenichel et al. (2016).
A list of approximation results. Use results$item
(or results[["item"]]) to extract individual components:
shadowp |
Estimated shadow (accounting) prices, |
iw |
Inclusive wealth, |
vfun |
Estimated value function, |
stock |
Stock values used in the simulation. |
wval |
|
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.
doi:10.1086/676034
Fenichel, Eli P., Joshua K. Abbott, Jude Bayham, Whitney Boone, Erin M. K. Haacker, and Lisa Pfeiffer. (2016) Measuring the Value of Groundwater and Other Forms of Natural Capital. Proceedings of the National Academy of Sciences. 113: 2382–2387. doi:10.1073/pnas.1513779113
aproxdef, pdotaprox, plotgen, GOM
## 1-D Reef-fish example: see Fenichel and Abbott (2014) data("GOM") param <- GOM$param simData <- GOM$simData Aspace <- aproxdef(param$order, param$lowerK, param$upperK, param$delta) pdotC <- pdotaprox( Aspace, simData$stock, simData$sdot, simData$dsdotds, simData$dsdotdss, simData$dwds, simData$dwdss ) GOMSimPdot <- pdotsim( pdotC, simData$stock, simData$sdot, simData$dsdotds, simData$profit, simData$dwds ) ## Shadow price plotgen(GOMSimPdot, xlabel = "Stock size, s", ylabel = "Shadow price") ## Value function and profit plotgen(GOMSimPdot, ftype = "vw", xlabel = "Stock size, s", ylabel = c("Value Function", "Profit"))## 1-D Reef-fish example: see Fenichel and Abbott (2014) data("GOM") param <- GOM$param simData <- GOM$simData Aspace <- aproxdef(param$order, param$lowerK, param$upperK, param$delta) pdotC <- pdotaprox( Aspace, simData$stock, simData$sdot, simData$dsdotds, simData$dsdotdss, simData$dwds, simData$dwdss ) GOMSimPdot <- pdotsim( pdotC, simData$stock, simData$sdot, simData$dsdotds, simData$profit, simData$dwds ) ## Shadow price plotgen(GOMSimPdot, xlabel = "Stock size, s", ylabel = "Shadow price") ## Value function and profit plotgen(GOMSimPdot, ftype = "vw", xlabel = "Stock size, s", ylabel = c("Value Function", "Profit"))
Generate plots of shadow prices and value functions
based on simulation results from vsim, psim, or pdotsim.
plotgen(simres, ftype = NULL, whichs = NULL, tvar = NULL, xlabel = NULL, ylabel = NULL)plotgen(simres, ftype = NULL, whichs = NULL, tvar = NULL, xlabel = NULL, ylabel = NULL)
simres |
A simulation result from |
ftype |
Plot type. If |
whichs |
An integer specifying which stock to plot in multi-stock cases.
Must satisfy |
tvar |
Optional time variable. If provided, the x-axis is time instead of stock. |
xlabel |
Optional character string for the x-axis label.
Defaults to |
ylabel |
Optional character vector for y-axis labels.
For |
This function produces one-dimensional plots for:
Shadow price versus stock
Shadow price versus time
Value function versus stock
Value function versus time
Value function and W-value versus stock
Value function and W-value versus time
The specific plot depends on the combination of ftype,
whichs, and tvar.
Produces a plot of shadow prices, value function, and optionally W-values. The function is called for its side effect of producing a plot.
GOM
pdotsim
psim,
vsim,
vaprox.pindyck
## 1-D Reef-fish example: see Fenichel and Abbott (2014) data("GOM") param <- GOM$param simData <- GOM$simData Aspace <- aproxdef(param$order, param$lowerK, param$upperK, param$delta) pC <- paprox( Aspace, simData$stock, simData$sdot, simData$dsdotds, simData$dwds ) ## Without providing W-value GOMSimP <- psim( pC, simData$stock ) ## With W-value GOMSimP2 <- psim(pC, simData$stock, simData$profit, simData$sdot) ## Shadow price vs stock plotgen(GOMSimP) plotgen(GOMSimP, ftype = "p") plotgen(GOMSimP, xlabel = "Stock Size, S", ylabel = "Shadow Price (USD/kg)") ## Value function and W-value vs stock plotgen(GOMSimP2, ftype = "vw") plotgen(GOMSimP2, ftype = "vw", xlabel = "Stock Size, S", ylabel = c("Value Function", "Profit"))## 1-D Reef-fish example: see Fenichel and Abbott (2014) data("GOM") param <- GOM$param simData <- GOM$simData Aspace <- aproxdef(param$order, param$lowerK, param$upperK, param$delta) pC <- paprox( Aspace, simData$stock, simData$sdot, simData$dsdotds, simData$dwds ) ## Without providing W-value GOMSimP <- psim( pC, simData$stock ) ## With W-value GOMSimP2 <- psim(pC, simData$stock, simData$profit, simData$sdot) ## Shadow price vs stock plotgen(GOMSimP) plotgen(GOMSimP, ftype = "p") plotgen(GOMSimP, xlabel = "Stock Size, S", ylabel = "Shadow Price (USD/kg)") ## Value function and W-value vs stock plotgen(GOMSimP2, ftype = "vw") plotgen(GOMSimP2, ftype = "vw", xlabel = "Stock Size, S", ylabel = c("Value Function", "Profit"))
Simulates the P-approximation by evaluating the estimated shadow price function and, optionally, the associated value function over a given set of stock values.
psim(pcoeff, stock, wval = NULL, sdot = NULL)psim(pcoeff, stock, wval = NULL, sdot = NULL)
pcoeff |
An approximation result object returned by |
stock |
A numeric vector of stock values at which to evaluate the P-approximation. |
wval |
(Optional) A numeric vector of flow payoff values, |
sdot |
(Optional) A numeric vector of stock dynamics, |
Let denote the vector of approximation coefficients returned by paprox.
The estimated shadow (accounting) price over the approximation interval
is given by:
where denotes the vector of Chebyshev basis functions.
If both wval and sdot are provided, the estimated value function is computed as:
For additional theoretical details, see Fenichel and Abbott (2014) and Fenichel et al. (2016).
A list containing simulated P-approximation outputs. Use result$item (or result[["item"]]) to extract individual components.
shadowp |
Estimated shadow (accounting) prices, |
iw |
Inclusive wealth, defined as |
vfun |
Estimated value function, |
stock |
Stock values used for evaluation, returned as a column matrix. |
wval |
Flow payoff values, |
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.
doi:10.1086/676034
Fenichel, Eli P., Joshua K. Abbott, Jude Bayham, Whitney Boone, Erin M. K. Haacker, and Lisa Pfeiffer. (2016) Measuring the Value of Groundwater and Other Forms of Natural Capital. Proceedings of the National Academy of Sciences. 113: 2382–2387. doi:10.1073/pnas.1513779113
aproxdef, paprox, plotgen, GOM
## 1-D Reef-fish example: see Fenichel and Abbott (2014) data("GOM") param <- GOM$param simData <- GOM$simData Aspace <- aproxdef(param$order, param$lowerK, param$upperK, param$delta) pC <- paprox( Aspace, simData$stock, simData$sdot, simData$dsdotds, simData$dwds ) GOMSimP <- psim( pC, simData$stock, simData$profit, simData$sdot ) ## Shadow price plotgen(GOMSimP, xlabel = "Stock size, s", ylabel = "Shadow price") ## Value function and profit plotgen( GOMSimP, ftype = "vw", xlabel = "Stock size, s", ylabel = c("Value Function", "Profit") )## 1-D Reef-fish example: see Fenichel and Abbott (2014) data("GOM") param <- GOM$param simData <- GOM$simData Aspace <- aproxdef(param$order, param$lowerK, param$upperK, param$delta) pC <- paprox( Aspace, simData$stock, simData$sdot, simData$dsdotds, simData$dwds ) GOMSimP <- psim( pC, simData$stock, simData$profit, simData$sdot ) ## Shadow price plotgen(GOMSimP, xlabel = "Stock size, s", ylabel = "Shadow price") ## Value function and profit plotgen( GOMSimP, ftype = "vw", xlabel = "Stock size, s", ylabel = c("Value Function", "Profit") )
Generate a multi-dimensional uniform grid over bounded intervals.
unigrids(nnodes, lb, ub, rtype = NULL)unigrids(nnodes, lb, ub, rtype = NULL)
nnodes |
A vector specifying the number of nodes in each dimension. |
lb |
A vector of lower bounds for each dimension. |
ub |
A vector of upper bounds for each dimension. |
rtype |
Type of return value. The default |
For the -th dimension, , suppose a polynomial approximant
over a bounded interval is defined by evenly spaced nodes.
Then, a -dimensional uniform grid is defined as:
This corresponds to all combinations of the marginal grids .
Two types of return values are provided.
rtype = "list" returns a list of length containing the marginal grids,
whereas rtype = "grid" returns a
matrix of all grid points.
A list with elements of uniform nodes, or a
matrix of uniform grid points.
## Uniform grid with two dimensions unigrids(c(5, 3), c(1, 1), c(2, 3)) ## Returns the same result explicitly as a list unigrids(c(5, 3), c(1, 1), c(2, 3), rtype = "list") ## Returns a matrix of grid points over the same domain unigrids(c(5, 3), c(1, 1), c(2, 3), rtype = "grid") ## Uniform grid with one dimension unigrids(5, 1, 2) ## Uniform grid with three dimensions unigrids(c(3, 4, 5), c(1, 1, 1), c(2, 3, 4), rtype = "grid")## Uniform grid with two dimensions unigrids(c(5, 3), c(1, 1), c(2, 3)) ## Returns the same result explicitly as a list unigrids(c(5, 3), c(1, 1), c(2, 3), rtype = "list") ## Returns a matrix of grid points over the same domain unigrids(c(5, 3), c(1, 1), c(2, 3), rtype = "grid") ## Uniform grid with one dimension unigrids(5, 1, 2) ## Uniform grid with three dimensions unigrids(c(3, 4, 5), c(1, 1, 1), c(2, 3, 4), rtype = "grid")
Computes Chebyshev polynomial coefficients for approximating the value function
over a bounded state space.
The function supports multi-dimensional deterministic and stochastic
dynamic optimization problems within the natural capital asset pricing (CAPN)
framework.
vaprox(aproxspace, stock, sdot, w, covmat = NULL)vaprox(aproxspace, stock, sdot, w, covmat = NULL)
aproxspace |
An approximation space defined by the |
stock |
A vector or matrix of stock states |
sdot |
A vector or matrix of stock dynamics |
w |
A vector of net benefits (profits or economic program values), |
covmat |
An optional variance–covariance matrix of the state dynamics.
Columns must correspond to the unique |
The V-approximation solves for the value function from the
Hamilton–Jacobi–Bellman equation.
Deterministic case:
Stochastic case:
where is the discount rate,
denotes net benefits,
is the shadow (accounting) price,
is the drift term, and
is the variance of the stochastic process.
The value function is approximated as
where denotes the Chebyshev basis evaluated at
and is the vector of unknown coefficients.
Substituting this approximation into the HJB equation yields a linear system:
Deterministic:
Stochastic:
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:
where collects the terms multiplying .
The formulation extends naturally to multi-dimensional state spaces using tensor products of Chebyshev bases.
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".
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.
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.
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. doi:10.1073/pnas.1617666114
## 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 )## 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 )
Computes Chebyshev polynomial coefficients for approximating the value function
over a bounded state space using value function iteration described in
Pindyck (1984) and Abbott, Fenicehl, and Yun (2026).
The function supports one-dimensional deterministic and stochastic
dynamic optimization problems within the natural capital asset pricing (CAPN)
framework.
vaprox.pindyck(param, growthfun = c("logistic", "gompertz", "sqroot"), covmat = NULL, itermax = 300, tol = 1e-8)vaprox.pindyck(param, growthfun = c("logistic", "gompertz", "sqroot"), covmat = NULL, itermax = 300, tol = 1e-8)
param |
A data.frame of parameters adopted in three examples in pindyck (1984) |
growthfun |
A net growth function: one of the three net growth function in Pindyck (1984)
|
covmat |
An optional variance–covariance matrix of the state dynamics.
Columns must correspond to the unique |
itermax |
Maximum number of iterations. Default is 300. |
tol |
Tolerance of the error size. Default is 1e-8. |
The V-approximation with value function iteration solves for the value function
in Pindyck (1984) and Abbott, Fenichel, and Yun (2026).
A state equation in the examples in Pindyck (1984) is defined as:
where is a Weiner process.
The net growth functions are:
Logistic net growth function:
Gompertz net gorwth function:
Square-root net gorwth function:
where is the instrinsic growth rate,
the carrying capacity
is the shadow (accounting) price.
The catch (harvest) function:
The profit (net benefit) function:
If :
if :
where is the demand parameter,
is the cost parameter,
is the elasticity of demand, and
is the elasticity of marginal cost.
More details are available in Pindyck (1984).
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".
gfun: net growth function decleared in the argument
wfun: profit (net benefit) function with the decleared "gfun"
qfun: catch (harvest) function with the decleared "gfun"
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.
doi:10.1086/741689
Pindyck, Robert S. (1984). Uncertainty in the Theory of Renewable Resource Markets. Review of Economic Studies, 51(2), 289–303. doi:10.2307/2297693
AFY
aproxdef,
plotgen
vaprox,
vsim
################################################################################ ## Logistic net growth function: Example 1 in Pindyck (1984) data("AFY") ## parameters used in Abbott, Fenichel, and Yun (2026) param <- AFY$param ## approximation and simulation range stock <- chebnodegen(param$nodes,param$lowerK,param$upperK) ## volatility term theta <- 0.1 sigsGBM <- as.matrix((theta*stock)^2,col=1) cvlogistic <- vaprox.pindyck(param,'logistic',sigsGBM) vlogistic <- vsim(cvlogistic,stock) ## plot value function plotgen(vlogistic,ftype="vw",xlabel="Stock Size", ylabel="Value Function") ## plot shadow (accounting) prices plotgen(vlogistic,ftype="p",xlabel="Stock Size", ylabel="Shadow Price")################################################################################ ## Logistic net growth function: Example 1 in Pindyck (1984) data("AFY") ## parameters used in Abbott, Fenichel, and Yun (2026) param <- AFY$param ## approximation and simulation range stock <- chebnodegen(param$nodes,param$lowerK,param$upperK) ## volatility term theta <- 0.1 sigsGBM <- as.matrix((theta*stock)^2,col=1) cvlogistic <- vaprox.pindyck(param,'logistic',sigsGBM) vlogistic <- vsim(cvlogistic,stock) ## plot value function plotgen(vlogistic,ftype="vw",xlabel="Stock Size", ylabel="Value Function") ## plot shadow (accounting) prices plotgen(vlogistic,ftype="p",xlabel="Stock Size", ylabel="Shadow Price")
Computes Chebyshev polynomial coefficients for approximating the value function
in a dynamic optimization problem with Poisson jump risk.
The function is designed for one-dimensional natural capital asset pricing
applications.
vaprox.pjump(aproxspace, stock, sdot, wb, hs, zs)vaprox.pjump(aproxspace, stock, sdot, wb, hs, zs)
aproxspace |
An approximation space defined by the |
stock |
A vector or matrix of stock states |
sdot |
A vector or matrix of stock dynamics |
wb |
A vector of net benefits (profits or economic program values) without a shock,
|
hs |
A vector of stock-dependent hazard rates, |
zs |
A vector of infinite-horizon net benefits following a jump event, |
The value function with Poisson jump risk satisfies the
Hamilton–Jacobi–Bellman equation derived in Abbott, Fenichel, and Yun (2026),
building on Reed and Heras (1992):
where is the discount rate,
denotes net benefits in the absence of a jump,
is the shadow (accounting) price,
is the stock-dependent hazard rate, and
is the post-jump infinite-horizon value.
Rearranging terms yields:
The value function is approximated as:
where is the Chebyshev basis evaluated at and
is the vector of unknown coefficients.
Substituting this approximation into the HJB equation produces the linear system:
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:
where collects the terms multiplying .
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: "Poisson Jump".
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.
doi:10.1086/741689
Reed, William J. and Hector E. Heras. (1992). The Conservation and Exploitation of Vulnerable Resources. Bulletin of Mathematical Biology, 54, 185–207. doi:10.1007/BF02464829
## Example from Abbott, Fenichel, and Yun (2026) data("AFY") param <- AFY$param ## Deterministic benchmark cvDET <- vaprox.pindyck(param, "logistic") slow <- 0.1 vlow <- vsim(cvDET, slow) qlow <- cvDET$qfun(param, slow, vlow$shadowp) zs <- cvDET$wfun(param, slow, qlow) / param$delta s <- chebnodegen(param$nodes, param$lowerK, param$upperK) qopt <- cvDET$qfun(param, s, vsim(cvDET, s)$shadowp) mus <- cvDET$gfun(param, s) - qopt alpha <- 0.5 hs <- alpha / (alpha + s) wb <- cvDET$wfun(param, s, qopt) Aspace <- aproxdef(param$order, param$lowerK, param$upperK, param$delta) cvPSS <- vaprox.pjump(Aspace, s, mus, wb, hs, zs) vPSS <- vsim(cvPSS, s) ## Plot value function plotgen(vPSS, ftype = "vw", xlabel = "Stock Size", ylabel = "Value Function") ## Plot shadow (accounting) price plotgen(vPSS, ftype = "p", xlabel = "Stock Size", ylabel = "Shadow Price")## Example from Abbott, Fenichel, and Yun (2026) data("AFY") param <- AFY$param ## Deterministic benchmark cvDET <- vaprox.pindyck(param, "logistic") slow <- 0.1 vlow <- vsim(cvDET, slow) qlow <- cvDET$qfun(param, slow, vlow$shadowp) zs <- cvDET$wfun(param, slow, qlow) / param$delta s <- chebnodegen(param$nodes, param$lowerK, param$upperK) qopt <- cvDET$qfun(param, s, vsim(cvDET, s)$shadowp) mus <- cvDET$gfun(param, s) - qopt alpha <- 0.5 hs <- alpha / (alpha + s) wb <- cvDET$wfun(param, s, qopt) Aspace <- aproxdef(param$order, param$lowerK, param$upperK, param$delta) cvPSS <- vaprox.pjump(Aspace, s, mus, wb, hs, zs) vPSS <- vsim(cvPSS, s) ## Plot value function plotgen(vPSS, ftype = "vw", xlabel = "Stock Size", ylabel = "Value Function") ## Plot shadow (accounting) price plotgen(vPSS, ftype = "p", xlabel = "Stock Size", ylabel = "Shadow Price")
Computes Chebyshev polynomial coefficients for approximating the value
function in a one-dimensional natural capital asset pricing
model with inaction (split) management.
The function allows for a boundary stock level at which management switches from waiting (inaction) to active use, and estimates both the value function and the associated passive value parameter.
vaprox.split(aproxspace, stock, sdot, profit, crit.stock, split.margp, split.time = NULL)vaprox.split(aproxspace, stock, sdot, profit, crit.stock, split.margp, split.time = NULL)
aproxspace |
An approximation space defined by the |
stock |
A vector or matrix of stock states |
sdot |
A vector or matrix of stock dynamics |
profit |
A vector of net benefits (profit or economic program value)
evaluated at |
crit.stock |
Critical (boundary) stock level, |
split.margp |
Marginal use value at the boundary stock,
|
split.time |
(Optional) Time of action |
Following Hashida and Fenichel (2022), management is characterized by an indicator function:
The benefit function can be decomposed as:
where represents realized income when harvesting
occurs (), and represents passive
(amenity) value when management remains inactive
().
At the boundary , smooth pasting implies:
The Hamilton–Jacobi–Bellman equation becomes:
The value function is approximated by Chebyshev polynomials:
where is the Chebyshev basis evaluated at ,
and is the vector of unknown coefficients.
Substituting into the HJB equation yields the linear system:
The passive value is approximated by a first-order form
, and and
are jointly determined using the boundary condition
.
In exactly identified cases, the system is solved directly. In over-determined cases, a least-squares solution is used:
where .
A complete application is provided in the forestDemo vignette.
See vignette("forestDemo").
A list containing the approximation results:
degree: Degree of the Chebyshev polynomial.
lowerB: Lower bound of the approximation interval.
upperB: Upper bound of the approximation interval.
delta: Discount rate.
coefficient: Estimated Chebyshev polynomial coefficients.
shadow.stop: Shadow price evaluated at the boundary stock .
alpha: Estimated passive value parameter at .
model.type: "Split (Economic Program)".
Hashida, Yukiko and Eli P. Fenichel. (2022). Valuing Natural Capital When Management Is Dominated by Periods of Inaction. American Journal of Agricultural Economics, 104(2), 791–811. doi:10.1111/ajae.12250
Simulates the value function and shadow (accounting) prices using the Chebyshev
polynomial approximation obtained from vaprox,
vaprox.pindyck, and vaprox.pjump.
vsim(vcoeff, stock, wval = NULL)vsim(vcoeff, stock, wval = NULL)
vcoeff |
An approximation object returned by the |
stock |
A numeric vector, matrix, or |
wval |
(Optional; used by |
Let denote the vector of approximation coefficients
obtained from vaprox.
For stock vector , the estimated
shadow (accounting) price of stock is given by
where denotes the Chebyshev polynomial basis.
The approximated value function is
Inclusive wealth is computed as the inner product of shadow prices and stock levels.
For further theoretical details, see Abbott, Fenichel, and Yun (2026), Fenichel and Abbott (2014), and Yun et al. (2017).
A list containing simulation results. Individual elements can be accessed using
results$item or results[["item"]].
shadowp |
Matrix of shadow (accounting) prices for each stock. |
iweach |
Inclusive wealth contribution of each stock (multi-stock case). |
iw |
Inclusive wealth. |
vfun |
Approximated value function. |
stock |
Stock values used in the simulation. |
wval |
Welfare values if |
model.type |
Either |
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.
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.
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. doi:10.1073/pnas.1617666114
AFY
aproxdef,
GOM,
LV,
plotgen,
vaprox,
vaprox.pindyck,
vaprox.pjump,
vaprox.split
# 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 ) GOMSimV <- vsim(vC, simData$stock, simData$profit) # plot shadow (accounting) price: Figure 4 in Fenichel and Abbott (2014) plotgen(GOMSimV, xlabel="Stock size, s", ylabel="Shadow price") ## 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 ) simVd <- vsim(vCd,AFY$simData$stock) # plot value function plotgen(simVd,ftype="vw",xlabel="Stock Size", ylabel="Value Function") # plot shadow (accounting) prices plotgen(simVd,ftype="p",xlabel="Stock Size", ylabel="Shadow Price") ## stochastic vCs <- vaprox( Aspace, AFY$simData$stock, AFY$simData$mus.s, AFY$simData$profit.s, AFY$simData$sigs ) simVs <- vsim(vCs,AFY$simData$stock) # plot value function plotgen(simVs,ftype="vw",xlabel="Stock Size", ylabel="Value Function") # plot shadow (accounting) prices plotgen(simVs,ftype="p",xlabel="Stock Size", ylabel="Shadow Price")# 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 ) GOMSimV <- vsim(vC, simData$stock, simData$profit) # plot shadow (accounting) price: Figure 4 in Fenichel and Abbott (2014) plotgen(GOMSimV, xlabel="Stock size, s", ylabel="Shadow price") ## 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 ) simVd <- vsim(vCd,AFY$simData$stock) # plot value function plotgen(simVd,ftype="vw",xlabel="Stock Size", ylabel="Value Function") # plot shadow (accounting) prices plotgen(simVd,ftype="p",xlabel="Stock Size", ylabel="Shadow Price") ## stochastic vCs <- vaprox( Aspace, AFY$simData$stock, AFY$simData$mus.s, AFY$simData$profit.s, AFY$simData$sigs ) simVs <- vsim(vCs,AFY$simData$stock) # plot value function plotgen(simVs,ftype="vw",xlabel="Stock Size", ylabel="Value Function") # plot shadow (accounting) prices plotgen(simVs,ftype="p",xlabel="Stock Size", ylabel="Shadow Price")