iRAM: Generate iRAM (impulse response anlaysis metric) from model...

Description Usage Arguments Value References Examples

View source: R/impulse_response.R

Description

Generate iRAM (impulse response anlaysis metric) from model fit.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
iRAM(
  model.fit,
  beta,
  var.number,
  lag.order = 1,
  threshold = 0.01,
  boot = FALSE,
  replication = 200,
  steps = 100
)

Arguments

model.fit

model fit object generated by lavaan

beta

beta matrix for a point estimate

var.number

number of variables in the time series

lag.order

lag order of the model to be fit

threshold

threshold of calculation of recovery time (duration of perturbation), default value is 0.01

boot

to bootstrap, default value is FALSE

replication

number of replication of bootstrap, default value is 200

steps

number of steps of impulse response analysis, default value is 100

Value

iRAM matrix. Rows represent where the orthognal impulse was given, and columns represent the response. Dimension is var.number by var.number.

References

Lütkepohl, H. (2007). New introduction to multiple time-series analysis. Berlin: Springer.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
boot.iRAM <- iRAM(model.fit = usemmodelfit,
    beta = NULL,
    var.number = 3,
    lag.order = 1,
    threshold = 0.01,
    boot = TRUE,
    replication = 200,
    steps = 100
    )
boot.iRAM$mean

pompom documentation built on Feb. 15, 2021, 1:06 a.m.