Learn R Programming

capn (version 1.0.0)

vsim: Simulation of V-approximation

Description

The function provides the V-approximation simulation by adopting the results of vaprox. Available for multiple stock problems.

Usage

vsim(vcoeff, adata, wval = NULL)

Arguments

vcoeff

An approximation result from varpox function

adata

A data.frame or matrix of [stock]=[\(\mathbf{S}\)]

wval

(Optional for plotgen) An array of \(W\)-value

Value

A list of simulation resuts: shadow (accounting) prices, inclusive wealth, Value function, stock, and W values. Use results$item (or results[["item"]]) to import each result item.

shadowp

Shadow price

iweach

Inclusive wealth for each stock for multi-stock case

vfun

Value function

stock

Stock

wval

W-value if wval is provided

Details

Let \(\hat{\beta}\) be the approximation coefficent from the results of vaprox function. The estimated shadow (accounting) price of \(i\)-th stock over the given approximation intervals of \(s_{i} \in [a_{i},b_{i}]\), \(\hat{p}_{i}\) can be calcuated as:

\(\hat{p}_{i} = \mathbf{\mu}(\mathbf{S})\mathbf{\hat{\beta}}\) where \(\mathbf{\mu}(\mathbf{S})\) Chebyshev polynomial basis.

The value function is:

\(\hat{V} = \delta \mathbf{\mu}(\mathbf{S})\mathbf{\hat{\beta}}\).

For more detils see Fenichel and Abbott (2014), Fenichel et al. (2016a), Fenichel et al. (2016b), and Yun et al. (2017).

References

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. Fenichel, Eli P., Joshua K. Abbott, Jude Bayham, Whitney Boone, Erin M. K. Haacker, and Lisa Pfeiffer. (2016a) "Measuring the Value of Groundwater and Other Forms of Natural Capital." Proceedings of the National Academy of Sciences.113:2382-2387. Fenichel, Eli P., Simon A. Levin, Bonnie McCay, Kevin St. Martin, Joshua K. Abbott, and Malin L. Pinsky. (2016b) "Wealth Reallocation and Sustainability under Climate Change." Nature Climate change.6:237-244. Yun, Seong Do, Barbara Hutniczak, Joshua K. Abbott, and Eli P. Fenichel. (2017) "Ecosystem Based Management and the Welath of Ecosystems" Proceedings of the National Academy of Sciences. (forthcoming).

See Also

aproxdef, vsim

Examples

Run this code
## 1-D Reef-fish example: see Fenichel and Abbott (2014)
data("GOM")
nodes <- chebnodegen(param$nodes,param$lowerK,param$upperK)
simuDataV <- cbind(nodes,sdot(nodes,param),profit(nodes,param))
Aspace <- aproxdef(param$order,param$lowerK,param$upperK,param$delta)
vC <- vaprox(Aspace,simuDataV)
# Note vcol function requries a data.frame or matrix!
GOMSimV <- vsim(vC,as.matrix(simuDataV[,1],ncol=1),profit(nodes,param))

# plot shadow (accounting) price: Figure 4 in Fenichel and Abbott (2014)
plotgen(GOMSimV, xlabel="Stock size, s", ylabel="Shadow price")

## 2-D Prey-Predator example
data("lvdata")
aproxdeg <- c(20,20)
lower <- c(0.1,0.1)
upper <- c(1.5,1.5)
delta <- 0.03
lvspace <- aproxdef(aproxdeg,lower,upper,delta)
lvaproxc <- vaprox(lvspace,lvaproxdata)
lvsim <- vsim(lvaproxc,lvsimdata.time[,2:3])

# plot Biomass
plot(lvsimdata.time[,1], lvsimdata.time[,2], type='l', lwd=2, col="blue",
     xlab="Time",
     ylab="Biomass")
lines(lvsimdata.time[,1], lvsimdata.time[,3], lwd=2, col="red")
legend("topright", c("Prey", "Predator"), col=c("blue", "red"),
       lty=c(1,1), lwd=c(2,2), bty="n")

# plot shadow (accounting) prices
plot(lvsimdata.time[,1],lvsim[["shadowp"]][,1],type='l', lwd=2, col="blue",
     ylim = c(-5,7),
     xlab="Time",
     ylab="Shadow price")
lines(lvsimdata.time[,1],lvsim[["shadowp"]][,2], lwd=2, col="red")
legend("topright", c("Prey", "Predator"), col=c("blue", "red"),
       lty=c(1,1), lwd=c(2,2), bty="n")

# plot inclusive weath and value function
plot(lvsimdata.time[,1],lvsim[["iw"]],type='l', lwd=2, col="blue",
     ylim = c(-0.5,1.2),
     xlab="Time",
     ylab="Inclusive Wealth / Value Function ($)")
lines(lvsimdata.time[,1],lvsim[["vfun"]], lwd=2, col="red")
legend("topright", c("Inclusive Wealth", "Value Function"),
       col=c("blue", "red"), lty=c(1,1), lwd=c(2,2), bty="n")

Run the code above in your browser using DataLab