optimTransition: optimTransition

Description Usage Arguments See Also Examples

Description

Core function of the package, uses gradient descent to find optimal Transition matrix

Usage

1
2
optimTransition(Old, New, Transition = NA, iterations = 1000,
  epsilon = 1e-07, alpha = NA, documentation = FALSE)

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, defaults to a matrix of equal values

iterations

number of iterations, defaults to 1000

epsilon

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

alpha

step size α, defaults to .01 / initial error

documentation

boolean indicating whether long results (including parameters of function call) shall be returned. Defaults to FALSE

See Also

optimTransitionCluster for analysis by clusters

Examples

1
2
3
4
5
 data(LTW_2011)
 data(LTW_2016)
 result <- optimTransition (LTW_2011, LTW_2016)
 plot (result$Errors)
 View (result$Transition)

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