Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

plot.bbnam

Plotting for bbnam Objects


Description

Generates various plots of posterior draws from the bbnam model.

Usage

## S3 method for class 'bbnam'
plot(x, mode="density", intlines=TRUE, ...)

Arguments

x

A bbnam object

mode

“density” for kernel density estimators of posterior marginals; otherwise, histograms are used

intlines

Plot lines for the 0.9 central posterior probability intervals?

...

Additional arguments to plot

Details

plot.bbnam provides plots of the estimated posterior marginals for the criterion graph and error parameters (as appropriate). Plotting may run into difficulties when dealing with large graphs, due to the problem of getting all of the various plots on the page; the routine handles these issues reasonably intelligently, but there is doubtless room for improvement.

Value

None

Author(s)

Carter T. Butts buttsc@uci.edu

References

Butts, C.T. (1999). “Informant (In)Accuracy and Network Estimation: A Bayesian Approach.” CASOS Working Paper, Carnegie Mellon University.

See Also

Examples

#Create some random data
g<-rgraph(5)
g.p<-0.8*g+0.2*(1-g)
dat<-rgraph(5,5,tprob=g.p)

#Define a network prior
pnet<-matrix(ncol=5,nrow=5)
pnet[,]<-0.5
#Define em and ep priors
pem<-matrix(nrow=5,ncol=2)
pem[,1]<-3
pem[,2]<-5
pep<-matrix(nrow=5,ncol=2)
pep[,1]<-3
pep[,2]<-5

#Draw from the posterior
b<-bbnam(dat,model="actor",nprior=pnet,emprior=pem,epprior=pep,
    burntime=100,draws=100)
#Print a summary of the posterior draws
summary(b)
#Plot the result
plot(b)

sna

Tools for Social Network Analysis

v2.6
GPL (>= 2)
Authors
Carter T. Butts [aut, cre, cph]
Initial release
2020-10-5

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.