Description Usage Arguments Value Author(s) References Examples
Moving range surveillance control chart and plots for a desired collection of statistics
1 2 3 4 |
Statistics: |
a data frame whose rows represent time and columns represent a desired statistic to be monitored |
phase1.length: |
number of networks to use in phase 1 of monitoring |
plot: |
a logical specifying whether or not to plot (and save) the control chart for each statistic |
directory: |
the directory where a .pdf version of the plot is stored (if plot == TRUE). Default is the current directory |
height: |
height (in inches) of the printed plot |
width: |
width (in inches) of the printed plot |
xlab: |
the label on the x axis. Default is "Time" |
ylab: |
the label on the y axis. Default is "Value" |
xaxis.old: |
the old labels for the time variable on the x axis. Default is 1:T |
xaxis.new: |
the new labels that you wish to have on the x axis. Default is 1:T. Note that this must have the same length as xaxis.old |
a list containing the objects
P.hat.array: an array of length T whose tth entry is the estimated MLE of P for the tth network
delta.hat.array: an array of length T whose tth entry are the estimated MLEs of the delta parameters for the tth network
delta.hat.global: a numeric of length T whose tth entry is the estimated MLE of the overall standard deviation of the theta parameters for the tth network
James D. Wilson and Nathaniel T. Stevens
Wilson, James D., Stevens, Nathaniel T., and Woodall, William H. (2016). <e2><80><9c>Modeling and estimating change in temporal networks via a dynamic degree corrected stochastic block model.<e2><80><9d> arXiv Preprint: http://arxiv.org/abs/1605.04049
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | #Generate a collection of 50 networks with a change at time 25. The change is a local
#change in connection propensity in community 1
n <- 100
P.old <- cbind(c(0.10, 0.01), c(0.02, 0.075))
P.new <- cbind(c(0.20, 0.025), c(0.02, 0.075))
P.array <- array(c(replicate(25, P.old), replicate(25, P.new)), dim = c(2, 2, 50))
community.array <- array(rep(c(rep(1, 50), rep(2, 50)), 50), dim = c(1, 100, 50))
delta.array <- array(rep(rep(0.2, 2), 50), dim = c(1, 2, 50))
dynamic.net <- dynamic.DCSBM(n = 100, T = 50, P.array = P.array,
community.array = community.array,
delta.array = delta.array, edge.list = FALSE)
image(Matrix(dynamic.net$Adjacency.list[[1]]))
image(Matrix(dynamic.net$Adjacency.list[[30]]))
#Estimate the MLEs
MLEs.example <- MLE.DCSBM(dynamic.net$Adjacency.list, community.array = community.array,
T = 50, k = 2)
#Store the statistics in a data frame
statistics.df <- data.frame(Phat_11 = MLEs.example$P.hat.array[1, 1, ],
Phat_12 = MLEs.example$P.hat.array[1, 2, ],
delta_hat = MLEs.example$delta.hat.global)
control.chart <- NetSurv(statistics.df, phase1.length = 20, plot = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.