agcEffect takes a covariate and outcome model fit from agcParam, parameters for an MCMC, and the specified treatment effect and determines the causal estimates (direct and spillover) generated from the network structure.

agcEffect(mod, burnin = 1, thin = 0.5, treatment_allocation = 0.5,
  subset = 0, R = 10, burnin_R = 10, burnin_cov = 10,
  average = TRUE, index_override = 0)

# S4 method for list
agcEffect(mod, burnin = 1, thin = 0.2,
  treatment_allocation = 0.5, subset = 0, R = 10, burnin_R = 10,
  burnin_cov = 10, average = TRUE, index_override = 0)

Arguments

mod

An agcParamClass object from agcParam containing variables to be considered for the covariate model.

burnin

The index to start evaluation as one would normally have for a burnin for a Bayesian computation. Default = 1

thin

The rate at which to evaluate the outcome model. The closer to 1, the more values to compute (supplying 1 will not thin at all).

treatment_allocation

The proportion of the individuals in the network to receive the treatment. Should be a number between 0 and 1. Default = 0.5.

subset

The indices of the individuals, as they appear in the adjacency matrix, to be included in the network causal effects estimates. Default = 0 (include everyone).

R

The number of iterations for the Gibbs inner loop. Default = 10.

burnin_R

The index to start evaluation as one would normally have for a burnin for a Bayesian computation. Default = 10.

burnin_cov

The index to start saving covariates for use in the network causal effect chains. Default = 10.

average

An indicator of whether to evaluate the causal effects as an average of the R iterations. Default = "TRUE".

index_override

The MCMC outer loop iteration numbers to include in the evaluation of the causal effects. This will override the burnin and thin parameters. Default = 0 (all iterations included).

Value

An S3 object of type agcEffectClass that contains essential values for the outcome model.

Examples

rdsIn <- readRDS(paste0(system.file('extdata',package='autognet'),"/agc-example.rds")) adjmat <- rdsIn[[1]] data <- rdsIn[[2]] treatment <- "treatment" outcome <- "outcome" B = 10 R = 5 seed = 1 mod <- agcParam(data, treatment, outcome, adjmat, B = B, R = R, seed = c(1))
#> | | | 0% | |======== | 11% | |================ | 22% | |======================= | 33% | |=============================== | 44% | |======================================= | 56% | |=============================================== | 67% | |====================================================== | 78% | |============================================================== | 89% | |======================================================================| 100%
effects <- agcEffect(mod)
#> | | | 0% | |======================================================================| 100%