lagPlot {dlsem}R Documentation

Plot of lag shapes

Description

A pathwise or an overall causal lag shape is displayed.

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, to, path

To display the overall causal lag shape of a variable to another one, their names must be provided to arguments from and to, respectively. To display a pathwise causal lag shape, the name of the path, indicated as a string made of the names of the variables in the path separated by '*', must be provided to argument path. Argument path will be ignored if both from and to are not NULL.

maxlag

The maximum lag displayed (optional).

cumul

Logical. If TRUE, cumulative causal effects are returned. Default is FALSE.

conf

The confidence level for each edge: only statistically significant edges at such confidence 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.

Note

Value NULL is returned if one of the following occurs: (i) no significant path at confidence level conf exists connecting the starting variables to the ending variable; (ii) the requested path does not exist or is not significant at confidence level conf.

See Also

dlsem; lagShapes; causalEff.

Examples

data(industry)
indus.code <- list(
  Consum~ecq(Job,0,5),
  Pollution~ecq(Job,1,8)+ecq(Consum,1,7)
  )
indus.mod <- dlsem(indus.code,group="Region",exogenous=c("Population","GDP"),data=industry,
  log=TRUE)

# the lag shape of the causal effect associated to specific paths
lagPlot(indus.mod,path="Job*Pollution")
lagPlot(indus.mod,path="Job*Consum*Pollution")

# the lag shape of an overall causal effect
lagPlot(indus.mod,from="Job",to="Pollution")

[Package dlsem version 2.4.6 Index]