Package 'SIRE'

Title: Finding Feedback Effects in SEM and Testing for Their Significance
Description: Provides two main functionalities. 1 - Given a system of simultaneous equation, it decomposes the matrix of coefficients weighting the endogenous variables into three submatrices: one includes the subset of coefficients that have a causal nature in the model, two include the subset of coefficients that have a interdependent nature in the model, either at systematic level or induced by the correlation between error terms. 2 - Given a decomposed model, it tests for the significance of the interdependent relationships acting in the system, via Maximum likelihood and Wald test, which can be built starting from the function output. For theoretical reference see Faliva (1992) <doi:10.1007/BF02589085> and Faliva and Zoia (1994) <doi:10.1007/BF02589041>.
Authors: Gianmarco Vacca [aut, cre]
Maintainer: Gianmarco Vacca <[email protected]>
License: GPL-3
Version: 1.1.0
Built: 2025-03-01 05:38:10 UTC
Source: https://github.com/cran/SIRE

Help Index


Estimation and decomposition of simultaneous equation model

Description

Estimate and/or decompose a Simultaneous Equation Model into its recursive and Interdependent sub-systems

Usage

causal_decompose(data, eq.system, resid.est = "noDfCor", instruments,
  sigma.in = NULL)

Arguments

data

the data frame containing the data

eq.system

the system of equations (a list of formula objects, e.g. as in pkg systemfit)

resid.est

the estimation methods for the residual covariance matrix (as in systemfit)

instruments

the intruments used to estimate the model via 3-SLS (as in systemfit)

sigma.in

the Σ\Sigma matrix, if the user wants to simulate a particular structure at stochastic level. Overrides 3SLS estimation if specified.

Value

A list with components

  • eq.system: the system of equations given as input

  • Gamma: the 3-SLS estimate of Γ\Gamma'

  • C: the matrix highlighting the interdependent mechanisms at deterministic level.

  • Psi1: the matrix highlighting the interdependent mechanisms at stochastic level.

  • Psi0: the matrix highlighting the causal mechanisms.

  • A: the 3-SLS estimate of AA

  • Sigma: the 3-SLS estimate of SigmaSigma

  • systemfit: the output from the systemfit function used to estimate the model

  • all.graph: the path diagram of the model, using the package igraph

  • dec.graph: the path diagram of the decomposed model, with color coding for each vertex

  • type.out: the type of analysis performed, either 'simulation' or 'empirical'

Examples

data("macroIT")
eq.system = list(
               eq1 = C ~  CP  + I + CP_1,
               eq2 = I ~ K + CP_1,
               eq3 = WP ~ I + GDP + GDP_1,
               eq4 = GDP ~ C + I + GDP_1,
               eq5 = CP ~ WP + T,
               eq6 = K ~ I + K_1)

instruments = ~ T + CP_1 + GDP_1 + K_1

causal_decompose(data = macroIT,
               eq.system = eq.system,
               resid.est = "noDfCor",
               instruments = instruments,
               sigma.in = NULL)

Decomposition starting from Gamma and Sigma

Description

Function to decompose Γ\Gamma' into recursive and interdependent sub-matrices (internal use)

Usage

dec_calc(Gamma, Sigma)

Arguments

Gamma

the Γ\Gamma' matrix.

Sigma

the Σ\Sigma matrix.

Value

A list with components

  • C: the matrix highlighting the interdependent mechanisms at deterministic level.

  • Psi1: the matrix highlighting the interdependent mechanisms at stochastic level.

  • Psi0: the matrix highlighting the causal mechanisms.

  • powers: a list containing the matrix powers of Γ\Gamma'.


Testing for Feedback Effects in a Simultaneous Equation Model

Description

Testing for Feedback Effects in a Simultaneous Equation Model

Usage

feedback_ml(data, out.decompose, eq.id, lb = -200, ub = 200,
  nrestarts = 10, nsim = 20000, seed.in = 1)

Arguments

data

the data frame containing the data

out.decompose

the decomposition object resulting from causal_decompose()

eq.id

the equation to be tested for feedback effects

lb

lower bound of the parameter space required for gosolnp

ub

upper bound of the parameter space required for gosolnp

nrestarts

number of solver restarts (as in gosolnp)

nsim

number of random parameters to generate for every restart of the solver (as in gosolnp)

seed.in

seed number for gosolnp routine

Value

A list with components

  • rho.est: a data frame with the maximum likelihood estimate of rhorho and the equations with which each element is involved in feedback-like mechanisms

  • loglik: the value of the log-likelihood of the model

  • theta.hessian: the hessian matrix for the estimated parameters

  • rho.jacobian: the Jacobian matrix of ρ\rho with respect to the entire set of parameters

  • wald: the resulting Wald test statistic

Examples

data("macroIT")
eq.system = list(
              eq1 = C ~  CP  + I + CP_1,
              eq2 = I ~ K + CP_1,
              eq3 = WP ~ I + GDP + GDP_1,
              eq4 = GDP ~ C + I + GDP_1,
              eq5 = CP ~ WP + T,
              eq6 = K ~ I + K_1)

instruments = ~ T + CP_1 + GDP_1 + K_1

c.dec = causal_decompose(data = macroIT,
                         eq.system = eq.system,
                         resid.est = "noDfCor",
                         instruments = instruments)

feedback_ml(data = macroIT,
              out.decompose = c.dec,
              eq.id = 5,
              lb = -200,
              ub = 200,
              nrestarts = 10,
              nsim = 20000,
              seed.in = 1)

Italian Macroeconomic Data

Description

Italian macroeconomic variables from Q3-1996 to Q2-2011 (T = 60 observations). The variables are

  • QTR: quarter and year of the observation

  • C: expenses for consumption for Italian families

  • CP: value added

  • WP: private wages from dependent employment

  • I: gross investment

  • K: gross capital stock

  • GDP: gross domestic product

  • T: taxes

  • CP_1: lagged value added

  • K_1: lagged gross capital stock

  • GDP_1: lagged gross domestic product

Usage

data(macroIT)

Format

An object of class tbl_df (inherits from tbl, data.frame) with 60 rows and 11 columns.

Source

http://dati.istat.it/

Examples

data(macroIT)

Rho Calculation

Description

Function to calculate rho (internal use)

Usage

rho_calc(l, Gamma, A, Sigma)

Arguments

l

the equation index for which to calculate rho

Gamma

the Γ\Gamma' matrix

A

the AA matrix

Sigma

the Σ\Sigma matrix

Value

A list with components

  • S0: the selection matrix for pjp_j.

  • S1: the selection matrix for Γ\Gamma'.

  • S2: the selection matrix. for AA