# ras: ras Updating Proejcting In ioanalysis: Input Output Analysis

## Description

Uses the ras technique to update the matrix of technical input coefficients A. You must have knowledge of or forecasts for the following three objects: (1) row sums u1 of A, (2) column sums v1 of A, and (3) total production x1.

## Usage

 1 ras(io, x1, u1, v1, tol, maxiter, verbose = FALSE) 

## Arguments

 io An InputOutput class object from as.inputoutput x1 Vector. The forecast for future total production of each region-sector combination, matching the X object in io u1 Vector. The forecast for future row sums of the matrix of technical input coefficients in A from io v1 Vector. The forecast for future column sums of the matrix of technical input coefficients in A from io tol Numeric. The tolerance for convergence. Default: 1e-06 maxiter Numeric. The maximum number of iterations to try for convergence. Defualt: 10000 verbose Logical. If TRUE will print the iteration and norm at each step. This is useful if the dataset is large. Deafult: FALSE

## Details

Uses the ras iterative technique for updating the matrix of technical input coefficients. This takes the form:

lim_{n \Rightarrow ∞} A^{2n} = lim_{n \Rightarrow ∞} [\hat{R}^n ... \hat{R}^1]A_t[\hat{S}^1 ... \hat{S}^n] = \hat{A}_{t+1}

where R^1 = diag(u_{t+1}/u_0), u_0 = A_tX, and u_{t+1} = u1. Similarly S^1 = diag(v_{t+1}/v_0), v_0 = XR^1A_t.

Each iteration calculates the full ras object; that is, 2 steps are caluclated per iteration.

See Blair and Miller (2009) for more details.

## Value

Produces the forecast of the matrix of technical input coefficients given the forecasted row sums, column sums, and total production.

John J. P. Wade

## References

Blair, P.D. and Miller, R.E. (2009). "Input-Output Analysis: Foundations and Extensions". Cambridge University Press

## See Also

as.inputoutput, lq

## Examples

  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 data(toy.IO) class(toy.IO) set.seed(117) growth <- 1 + 0.1 * runif(10) sort(growth) X <- toy.IO$X X1 <- X * growth U <- rowSums(toy.IO$Z) U1 <- U * growth V <- colSums(toy.IO\$Z) V1 <- V * growth ras <- ras(toy.IO, X1, U1, V1, maxiter = 10, verbose = TRUE) 

### Example output

Loading required package: ggplot2
Loading required package: plot3D
Loading required package: lpSolve
Warning message:
no DISPLAY variable so Tk is not available
 "InputOutput"
 1.000117 1.004538 1.007363 1.013443 1.043169 1.044370 1.046505 1.053531
 1.071782 1.075570
Iteration: 1   RMSE: 0.000887824134655695
Iteration: 2   RMSE: 2.64050640741665e-05
Iteration: 3   RMSE: 1.33487833734874e-06
Iteration: 4   RMSE: 7.71764009426244e-08


ioanalysis documentation built on Jan. 13, 2021, 5:16 p.m.