View source: R/BreakDiagnostic.R
BreakDiagnostic | R Documentation |
Detect a break number using different metrics
BreakDiagnostic( Y, R = 2, mcmc = 100, burnin = 100, verbose = 100, thin = 1, UL.Normal = "Orthonormal", v0 = NULL, v1 = NULL, break.upper = 3, a = 1, b = 1 )
Y |
Reponse tensor |
R |
Dimension of latent space. The default is 2. |
mcmc |
The number of MCMC iterations after burnin. |
burnin |
The number of burn-in iterations for the sampler. |
verbose |
A switch which determines whether or not the progress of the
sampler is printed to the screen. If |
thin |
The thinning interval used in the simulation. The number of MCMC iterations must be divisible by this value. |
UL.Normal |
Transformation of sampled U. Users can choose "NULL", "Normal" or "Orthonormal." "NULL" is no normalization. "Normal" is the standard normalization. "Orthonormal" is the Gram-Schmidt orthgonalization. Default is "NULL." |
v0 |
v_0/2 is the shape parameter for the inverse
Gamma prior on variance parameters for V.
If |
v1 |
v_1/2 is the scale parameter for the
inverse Gamma prior on variance parameters for V.
If |
break.upper |
Upper threshold for break number detection.
The default is |
a |
a is the shape1 beta prior for transition probabilities. By default, the expected duration is computed and corresponding a and b values are assigned. The expected duration is the sample period divided by the number of states. |
b |
b is the shape2 beta prior for transition probabilities. By default, the expected duration is computed and corresponding a and b values are assigned. The expected duration is the sample period divided by the number of states. |
Jong Hee Park and Yunkyun Sohn. 2020. "Detecting Structural Change in Longitudinal Network Data." Bayesian Analysis. Vol.15, No.1, pp.133-157.
## Not run: set.seed(19333) ## Generate an array (15 by 15 by 20) with a block merging transition Y <- MakeBlockNetworkChange(n=5, T=20, type ="merge") ## Fit 3 models (no break, one break, and two break) for break number detection detect <- BreakDiagnostic(Y, R=2, break.upper = 2) ## Look at the graph detect[[1]]; print(detect[[2]]) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.