expectedRewards: Expected Rewards for a markovchain

Description Usage Arguments Details Value Author(s) References Examples

View source: R/2_probabilistic.R

Description

Given a markovchain object and reward values for every state, function calculates expected reward value after n steps.

Usage

1

Arguments

markovchain

the markovchain-class object

n

no of steps of the process

rewards

vector depicting rewards coressponding to states

Details

the function uses a dynamic programming approach to solve a recursive equation described in reference.

Value

returns a vector of expected rewards for different initial states

Author(s)

Vandit Jain

References

Stochastic Processes: Theory for Applications, Robert G. Gallager, Cambridge University Press

Examples

1
2
3
4
transMatr<-matrix(c(0.99,0.01,0.01,0.99),nrow=2,byrow=TRUE)
simpleMc<-new("markovchain", states=c("a","b"),
             transitionMatrix=transMatr)
expectedRewards(simpleMc,1,c(0,1))

markovchain documentation built on Aug. 24, 2018, 1:03 a.m.