Learn R Programming

dlsem (version 1.0)

pathAnal: Perform path analysis at a given time lag

Description

Compute the coefficient associated to each path between one or more starting variables and one ending variable at a give time lag.

Usage

pathAnal(x, from = NULL, to = NULL, lag = NULL, cumul = FALSE, conf = 0.95, nitt = 50000)

Arguments

x
An object of class dlsem.
from
The name of the starting variable, or a vector of names of starting variables.
to
The name of the ending variable.
lag
A non-negative integer or a vector of non-negative integers indicating the time lag at which path coefficients must be computed. If NULL, all relevant time lags are considered.
cumul
Logical. If FALSE (the default), instantaneous path coefficients are returned, otherwise cumulative ones are provided.
conf
The confidence level for edges in the object of class dlsem. Default is 0.95.
nitt
An integer number greater or equal than 1000, representing the number of Monte Carlo replications to approximate condfidence intervals. Default is 50000.

Value

  • A list of matrices, one for each path between starting variables and the ending variable, plus one. Each matrix contains point estimate and conf*100% confidence interval for the associated coefficient at each requested time lag. The last matrix contains point estimate and conf*100% confidence interval for the overall coefficient at each requested time lag.

See Also

dlsem

Examples

Run this code
data(agres)
mycode <- list(
  GVA~quec(NPATENT,0,4),
  PPI~quec(NPATENT,0,6)+quec(GVA,0,10),
  ENTR_INCOME~quec(NPATENT,0,3)+quec(GVA,1,10)
  )
mod0 <- dlsem(mycode,group="COUNTRY",context=c("GDP","FARM_SIZE"),
  data=agres,uniroot.check=TRUE,imputation=FALSE,log=TRUE)
pathAnal(mod0,from="NPATENT",to="PPI",lag=c(0,5,10,15),cumul=TRUE,nitt=10000)

Run the code above in your browser using DataLab