SIRE 1.1.0 用户指南说明书
- 格式:pdf
- 大小:122.78 KB
- 文档页数:7
Package‘SIRE’
October12,2022
TypePackage
TitleFindingFeedbackEffectsinSEMandTestingforTheir
Significance
Version1.1.0
MaintainerGianmarcoVacca<**************************>
DescriptionProvidestwomainfunctionalities.
1-Givenasystemofsimultaneousequation,
itdecomposesthematrixofcoefficientsweightingtheendogenousvariables
intothreesubmatrices:oneincludesthesubsetofcoefficientsthathaveacausalnature
inthemodel,twoincludethesubsetofcoefficientsthathaveainterdependentnature
inthemodel,eitheratsystematiclevelorinducedbythecorrelationbetweenerrorterms.
2-Givenadecomposedmodel,
ittestsforthesignificanceoftheinterdependentrelationshipsactinginthesystem,
viaMaximumlikelihoodandWaldtest,whichcanbebuiltstartingfromthefunctionoutput.
FortheoreticalreferenceseeFaliva(1992)and
FalivaandZoia(1994).
LicenseGPL-3
EncodingUTF-8
LazyDatatrue
DependsR(>=3.1.0)
Importssystemfit,psych,igraph,matrixcalc,MASS,numDeriv,Matrix,
stringr,Rsolnp,dplyr,magrittr
RoxygenNote6.0.1
NeedsCompilationno
AuthorGianmarcoVacca[aut,cre]
RepositoryCRAN
Date/Publication2019-04-1116:32:41UTC
Rtopicsdocumented:
causal_decompose.....................................2
12causal_decompose
dec_calc...........................................3
feedback_ml.........................................4
macroIT...........................................5
rho_calc...........................................6
Index7
causal_decomposeEstimationanddecompositionofsimultaneousequationmodel
Description
Estimateand/ordecomposeaSimultaneousEquationModelintoitsrecursiveandInterdependent
sub-systems
Usage
causal_decompose(data,eq.system,resid.est="noDfCor",instruments,
sigma.in=NULL)
Arguments
datathedataframecontainingthedata
eq.systemthesystemofequations(alistofformulaobjects,e.g.asinpkgsystemfit)
resid.esttheestimationmethodsfortheresidualcovariancematrix(asinsystemfit)
instrumentstheintrumentsusedtoestimatethemodelvia3-SLS(asinsystemfit)
sigma.intheΣmatrix,iftheuserwantstosimulateaparticularstructureatstochastic
level.Overrides3SLSestimationifspecified.
Value
Alistwithcomponents
•eq.system:thesystemofequationsgivenasinput
•Gamma:the3-SLSestimateofΓ
•C:thematrixhighlightingtheinterdependentmechanismsatdeterministiclevel.
•Psi1:thematrixhighlightingtheinterdependentmechanismsatstochasticlevel.
•Psi0:thematrixhighlightingthecausalmechanisms.
•A:the3-SLSestimateofA
•Sigma:the3-SLSestimateofSigma
•systemfit:theoutputfromthesystemfitfunctionusedtoestimatethemodel
•all.graph:thepathdiagramofthemodel,usingthepackageigraph
•dec.graph:thepathdiagramofthedecomposedmodel,withcolorcodingforeachvertex
•type.out:thetypeofanalysisperformed,either’simulation’or’empirical’dec_calc3
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)
dec_calcDecompositionstartingfromGammaandSigma
Description
FunctiontodecomposeΓintorecursiveandinterdependentsub-matrices(internaluse)
Usage
dec_calc(Gamma,Sigma)
Arguments
GammatheΓmatrix.
SigmatheΣmatrix.
Value
Alistwithcomponents
•C:thematrixhighlightingtheinterdependentmechanismsatdeterministiclevel.
•Psi1:thematrixhighlightingtheinterdependentmechanismsatstochasticlevel.
•Psi0:thematrixhighlightingthecausalmechanisms.
•powers:alistcontainingthematrixpowersofΓ.4feedback_ml
feedback_mlTestingforFeedbackEffectsinaSimultaneousEquationModel
Description
TestingforFeedbackEffectsinaSimultaneousEquationModel
Usage
feedback_ml(data,out.decompose,eq.id,lb=-200,ub=200,
nrestarts=10,nsim=20000,seed.in=1)
Arguments
datathedataframecontainingthedata
out.decomposethedecompositionobjectresultingfromcausal_decompose()
eq.idtheequationtobetestedforfeedbackeffects
lblowerboundoftheparameterspacerequiredforgosolnp
ubupperboundoftheparameterspacerequiredforgosolnp
nrestartsnumberofsolverrestarts(asingosolnp)
nsimnumberofrandomparameterstogenerateforeveryrestartofthesolver(asin
gosolnp)
seed.inseednumberforgosolnproutine
Value
Alistwithcomponents
•rho.est:adataframewiththemaximumlikelihoodestimateofrhoandtheequationswith
whicheachelementisinvolvedinfeedback-likemechanisms
•loglik:thevalueofthelog-likelihoodofthemodel
•theta.hessian:thehessianmatrixfortheestimatedparameters
•rho.jacobian:theJacobianmatrixofρwithrespecttotheentiresetofparameters
•wald:theresultingWaldteststatistic
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,