Learn R Programming

dlsem (version 2.0)

lagPlot: Plot lag shapes

Description

Plot the lag shape associated to a path or to an overall causal effect.

Usage

lagPlot(x, from = NULL, to = NULL, path = NULL, maxlag = NULL, cumul = FALSE,
  conf = 0.95, use.ns = FALSE, ylim = NULL, title = NULL)

Arguments

x

An object of class dlsem.

from

The name of the starting variable.

to

The name of the ending variable.

path

The name of the path, indicated as a string made of the names of the variables in the path separated by '*'. Ignored if both from and to are not NULL.

maxlag

The maximum lag displayed (optional).

cumul

Logical. If FALSE (the default), instantaneous coefficients are returned, otherwise cumulative ones are provided.

conf

The confidence level for each edge: only statistically significant edges at such level are considered. Default is 0.95.

use.ns

A logical value indicating whether not statistically significant edges (at level conf) should be considered or not. If FALSE (the default), they will be ignored.

ylim

A vector of two numerical values indicating the limits of the y axis (optional). If NULL, the limits of the y axis are computed automatically.

title

The title of the plot (optional). If NULL, a default title is used.

See Also

dlsem; causalEff; lagPlot.

Examples

Run this code
# NOT RUN {
data(industry)
mycode <- list(
  Consum~quec(Job,0,5),
  Pollution~quec(Job,1,8)+quec(Consum,1,6)
  )
myfit <- dlsem(mycode,group="Region",exogenous=c("Population","GDP"),data=industry,log=TRUE)

# the lag shape associated to specific paths
lagPlot(myfit,path="Job*Pollution")
lagPlot(myfit,path="Job*Consum*Pollution")

# the lag shape associated to an overall causal effect
lagPlot(myfit,from="Job",to="Pollution")
# }

Run the code above in your browser using DataLab