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 |
from , to , path |
To display the overall causal lag shape of a variable to another one,
their names must be provided to arguments |
maxlag |
The maximum lag displayed (optional). |
cumul |
Logical. If |
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 |
ylim |
A vector of two numerical values indicating the limits of the y axis (optional). If |
title |
The title of the plot (optional). If |
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
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")