Description Usage Arguments Examples
This is an internal function to compute the impacts (direct, indirect and total) from a SEMCMC object.
1 2 3 4 5 6 7 8 9 10 11 |
obj |
A SEMCMC object. |
idx.var |
An index to subset the covariates coeffiecients |
var.names |
Vector with variable names |
W |
An adjacency matrix, same as used in the call to SEMCMC(). |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | data(columbus, package = "spdep")
W <- spdep::nb2mat(col.gal.nb, style = "W")
m.form <- CRIME ~ INC + HOVAL
#SEM model
sem.mcmc <- SEMCMC(m.form, data = columbus, W = W, model = "sem")
impacts(sem.mcmc, W)
data(columbus, package = "spdep")
W <- spdep::nb2mat(col.gal.nb, style = "W")
m.form <- CRIME ~ INC + HOVAL
#SLM model
slm.mcmc <- SEMCMC(m.form, data = columbus, W = W, model = "slm")
impacts(slm.mcmc, W)
data(columbus, package = "spdep")
W <- spdep::nb2mat(col.gal.nb, style = "W")
m.form <- CRIME ~ INC + HOVAL
#SDM model
sdm.mcmc <- SEMCMC(m.form, data = columbus, W = W, model = "sdm")
impacts(sdm.mcmc, W)
data(columbus, package = "spdep")
W <- spdep::nb2mat(col.gal.nb, style = "W")
m.form <- CRIME ~ INC + HOVAL
#SDEM model
sdem.mcmc <- SEMCMC(m.form, data = columbus, W = W, model = "sdem")
impacts(sdem.mcmc, W)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.