Learn R Programming

dlsem (version 2.4.6)

causalEff: Assessment of dynamic causal effects

Description

All the pathwise causal lag shapes and the overall one connecting two or more variables are computed.

Usage

causalEff(x, from = NULL, to = NULL, lag = NULL, cumul = FALSE, conf = 0.95,
  use.ns = FALSE)

Arguments

x

An object of class dlsem.

from

The name of the starting variable, or a vector containing the names of starting variables, which must be endogenous variables.

to

The name of the ending variable, which must be an endogenous variable.

lag

A non-negative integer or a vector of non-negative integers indicating the time lags to be considered. If NULL, the whole lag shapes will be considered.

cumul

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

conf

The confidence level. Default is 0.95.

use.ns

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

Value

A list containing several matrices including point estimates, standard errors and asymptotic confidence intervals (at level conf) for all the pathwise causal lag shapes and the overall one connecting the starting variables to the ending variable.

Details

A pathwise causal lag shape is the set of causal effects associated to a path at different time lags. An overall causal lag shape is the set of overall causal effects of a variable on another one at different time lags.

Note that, due to the properties of the multiple linear regression model, causal effects are net of the influence of the group factor and exogenous variables.

References

A. Magrini (2018). Linear Markovian models for lag exposure assessment. Biometrical Letters, 55(2): 179-195. DOI: 10.2478/bile-2018-0012.

See Also

dlsem; lagPlot.

Examples

Run this code
# NOT RUN {
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)
causalEff(indus.mod,from="Job",to="Pollution",lag=c(0,5,10,15),cumul=TRUE)
# }

Run the code above in your browser using DataLab