impacts.SEMCMC.xxx: Compute impacts for different models

Description Usage Arguments Examples

Description

This is an internal function to compute the impacts (direct, indirect and total) from a SEMCMC object.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## S3 method for class 'SEMCMC.sem'
impacts(obj, idx.var, var.names)

## S3 method for class 'SEMCMC.slm'
impacts(obj, W, idx.var, var.names)

## S3 method for class 'SEMCMC.sdm'
impacts(obj, W, idx.var, var.names)

## S3 method for class 'SEMCMC.sdem'
impacts(obj, W, idx.var, var.names)

Arguments

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().

Examples

 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)

becarioprecario/SEMCMC documentation built on Feb. 25, 2021, 4:03 p.m.