errorGradient: errorGradient

Description Usage Arguments

Description

This helper function calculates the partial gradient numerically for each element of Transition

Usage

1
errorGradient(Old, New, Transition, n, p, epsilon = 1e-07)

Arguments

Old

m by n matrix of values for n choices in m districts

New

m by p matrix of values for n choices in m districts

Transition

n by b matrix of transition values, all should be positive, row sums should be one

n

the number of outcomes in Old and the number of rows in Transition, provided for performance reasons

p

the number of outcomes in New and the number of rows in Transition, provided for performance reasons

epsilon

'ε'-value for numerical approximation of gradient, defaults to 0.0000001


chrisschwer/voterTransition-package documentation built on May 13, 2019, 6:56 p.m.