CID-gibbs: CIDnetworks: Bayesian Inference

Description Usage Arguments Details Value Author(s)

Description

Usage of CID Gibbs Samplers.

Usage

 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
  CID.Gibbs (input,
             outcome,
             node.names,
             components,
             class.outcome="ordinal",
             fill.in.missing.edges = missing(outcome),
             new.chain = FALSE,

             draws = 100,
             burnin = -1,
             thin = 10,
             report = 100,
             auto.converge = FALSE,
             extend.max=10,
             extend.count=100,
             verbose=2,
             ...)

  ## S3 method for class 'CID.Gibbs'
 print(x, ...)
  ## S3 method for class 'CID.Gibbs'
 summary(object, ...)
  ## S3 method for class 'CID.Gibbs'
 plot(x, ...)
  ## S3 method for class 'summary.CID.Gibbs'
 print(x, ...)

  likelihood.plot(x, ...)
  intercept.plot(x, mode = c("standard","trace"), ...)
  COV.plot(x, mode = c("standard","trace","scatterplot"), ...)
  LSM.plot(x, ...)
  SBM.plot(x, ...)
  MMSBM.plot(x, ...)
  SR.plot(x, ...)

  network.plot (x, fitted.values=FALSE, ...)
  sociogram.plot (x, component.color=0, vertexcolor, add.labels = TRUE, ...)

  n.nodes(object)
  edge.list(object)
  is.net.directed(object)
  net.density(object)
  outcome(object)
  node.names(object)
  inDegree(object)
  outDegree(object)
  socio(object)
  value.mat(CID.Gibbs.object, prob = TRUE)
  value.mat.mean(object, prob = TRUE)
  switcheroo(CID.Gibbs.object)  
 
  post.pred.mat(object)
  post.pred.apply(object, FUN)
  post.pred.mean(object)
  getModeLS(object, gridsize = 50)

  

Arguments

input

An object containing information about the edges in a network. Must be one of the following classes: Matrix, CIDnetwork, or CID.Gibbs. If input is a square matrix, it is assumed to be a sociomatrix. Otherwise a matrix with 2 columns and a number of rows equal to the number of edges is required. Providing a CIDnetwork will use the associated edge.list. Providing a CID.Gibbs object will continue the MCMC chain from the last draw.

outcome

If an edgelist is provided as input and outcome is missing, the edges provided are assumed to be the ones in a binary sociomatrix. Otherwise, an outcome value must be specified for each edge in the edgelist, and any edges not provided are assumed to have no data.

node.names

Names labeling each node in the network.

CID.Gibbs.object

If desired, an existing CID.Gibbs output object can be loaded instead of a new network specification.

components

A list of sub-components, including (COV, HBM, LSM, LVM, MMSBM, SBM, SR).

class.outcome

One of "ordinal" (default, values from 0 to higher integers), "binary" (ordinal in 0 and 1) or "gaussian" (unbounded continuous values). Class is auto-detected if NULL remains in place.

fill.in.missing.edges

If TRUE, the edge list will be augmented with zeroes for all unspecified but possible edges. By default, if an outcome is specified, these edges will not be added.

new.chain

If a CID.Gibbs object is provided, the default value of FALSE will return both the old and new MCMC chain combined. A value of TRUE will drop the old chain completely.

draws

Number of draws to return.

burnin

Number of draws to burnin. A negative value will automatically determine burnin amount.

thin

Amount of draws to thin the chain by.

report

Number of draws between reporting total draws so far.

auto.converge

When true, a Geweke convergence test on log-likleihood to detect convergence.

extend.max

Maximum number of times chain will be extended until it returns without converging.

extend.count

Number of draws to extend chain by if convergence test fails

verbose

Level of output to be displayed while running. A value of 0 will return little or no output. A value of 1 will only notify of warnings of misuse. A value of 2 will report progress of MCMC chain. A value of 3 or higher will report debugging values.

...

Further arguments to be passed to the Gibbs sampler routine or the plot routine. See details for more.

x, object

An object outputted from CID.Gibbs.

mode

Controls which diagnostic plot is made.

fitted.values

If TRUE, plots the fitted tie strength under the Gibbs sampler. If FALSE, plots the network outcomes as entered.

component.color

If non-zero, colors the nodes in the sociogram according to the output of the Gibbs sampler.

vertexcolor

User-passed vertex colors for sociogram.plot .

add.labels

When true, node labels are included on nodes.

trace

If selected, displays the Gibbs sampler trace plot for the intercept rather than a point and interval.

prob

In value.mat, converts the linear predictor value to the probability of a binary edge.

FUN

function to apply to all posterior samples.

gridsize

Gridsize for evaluating posterior distribution and searching for mode.

Details

This is the main routine for running a Gibbs sampler on any of the CID models. See the vignettes for more information.

Value

CID.Gibbs outputs a list containing a CID object, the results of the Gibbs sampler, and the Deviance Information Criterion estimate for the Gibbs.

Author(s)

A.C. Thomas <act@acthomas.ca>


bdabbs13/CIDnetworks documentation built on Nov. 15, 2019, 2:41 a.m.