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 |
Estimate and/or decompose a Simultaneous Equation Model into its recursive and Interdependent sub-systems
causal_decompose(data, eq.system, resid.est = "noDfCor", instruments, sigma.in = NULL)
causal_decompose(data, eq.system, resid.est = "noDfCor", instruments, sigma.in = NULL)
data |
the data frame containing the data |
eq.system |
the system of equations (a list of formula objects, e.g. as in pkg |
resid.est |
the estimation methods for the residual covariance matrix (as in |
instruments |
the intruments used to estimate the model via 3-SLS (as in |
sigma.in |
the |
A list with components
eq.system
: the system of equations given as input
Gamma
: the 3-SLS estimate of
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
Sigma
: the 3-SLS estimate of
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'
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)
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)
Function to decompose into recursive and
interdependent sub-matrices (internal use)
dec_calc(Gamma, Sigma)
dec_calc(Gamma, Sigma)
Gamma |
the |
Sigma |
the |
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 .
Testing for Feedback Effects in a Simultaneous Equation Model
feedback_ml(data, out.decompose, eq.id, lb = -200, ub = 200, nrestarts = 10, nsim = 20000, seed.in = 1)
feedback_ml(data, out.decompose, eq.id, lb = -200, ub = 200, nrestarts = 10, nsim = 20000, seed.in = 1)
data |
the data frame containing the data |
out.decompose |
the decomposition object resulting from |
eq.id |
the equation to be tested for feedback effects |
lb |
lower bound of the parameter space required for |
ub |
upper bound of the parameter space required for |
nrestarts |
number of solver restarts (as in |
nsim |
number of random parameters to generate for every restart of the solver (as in |
seed.in |
seed number for gosolnp routine |
A list with components
rho.est
: a data frame with the maximum likelihood estimate of 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 with respect to the entire set of parameters
wald
: the resulting Wald test statistic
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)
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 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
data(macroIT)
data(macroIT)
An object of class tbl_df
(inherits from tbl
, data.frame
) with 60 rows and 11 columns.
http://dati.istat.it/
data(macroIT)
data(macroIT)
Function to calculate rho (internal use)
rho_calc(l, Gamma, A, Sigma)
rho_calc(l, Gamma, A, Sigma)
l |
the equation index for which to calculate rho |
Gamma |
the |
A |
the |
Sigma |
the |
A list with components
S0
: the selection matrix for .
S1
: the selection matrix for .
S2
: the selection matrix. for