## Not run:
# ##Example 1
# ###Expectation after 3 time units under BM_linear with Beta at 0 = 7, and
# ###a slope of Beta = -0.1.
# expectation.gradient(gradient.span = c(0, 60), model = c("BM_linear"),
# values = FALSE, parameters=c(7,-0.1), time=c(3),quantile=TRUE)
#
#
# ##Example 2
# ###Expectation after 3 time units under OU_linear with Beta constant
# ###across the gradient and alpha declining.
# expectation.gradient(gradient.span = c(0, 60), model = c("OU_linear"),
# values = FALSE, parameters=c(0.1, 0, 7, -0.1), time=c(3),quantile=TRUE)
#
#
# ##Example 3
# ###Expectation after 3 time units under OU_linear with Beta declining across
# ###the gradient and alpha remaining constant.
# expectation.gradient(gradient.span = c(0, 60), model = c("OU_linear"),
# values = FALSE, parameters=c(7, -0.1, 10, 0), time=c(3),quantile=TRUE)
#
#
# ##Example 4
# ###Expectation after 3 time units under BM_2rate with Beta 5 times higher
# ###after a breakpoint at L = 20.
# expectation.gradient(gradient.span = c(0, 60), model = c("BM_2rate"),
# values = FALSE, parameters=c(1, 20,5), time=c(3),quantile=FALSE)
#
# ##Example 5
# ###Expectation after 3 time units under BM_linear_breakpoint with the slope
# ###of Beta increasing 5 times higher after a breakpoint at L = 20.
# expectation.gradient(gradient.span = c(0, 60), model = c("BM_linear_breakpoint"),
# values = FALSE, parameters=c(0.1, 0.001, 20,0.1), time=c(3),quantile=TRUE)
#
#
# ##Example 6
# ###Expectation after 3 time units under BM_quadratic in which beta increases
# ###initially across the gradient and then declines. Under the quadratic,
# ###Beta_a (the third parameter) > 0 parabola curves upward, Beta_a < 0 downward.
# expectation.gradient(gradient.span = c(0, 60), model = c("BM_quadratic"),
# values = FALSE, parameters=c(10, 15, -0.2), time=c(3),quantile=TRUE)
# ## End(Not run)
Run the code above in your browser using DataLab