View source: R/BreakDiagnostic.R
BreakDiagnostic | R Documentation |
Detect a break number using different metrics
BreakDiagnostic( y, X, mcmc = 100, burn = 100, verbose = 100, thin = 1, break.upper = 3 )
mcmc |
The number of MCMC iterations after burnin. |
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. |
break.upper |
Upper threshold for break number detection.
The default is |
Y |
Reponse tensor |
R |
Dimension of latent space. The default is 2. |
burnin |
The number of burn-in iterations for the sampler. |
degree.normal |
A null model for degree correction. Users can choose "NULL", "eigen" or "Lsym." "NULL" is no degree correction. "eigen" is a principal eigen-matrix consisting of the first eigenvalue and the corresponding eigenvector. " Lsym" is a modularity matrix. Default is "eigen." |
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 |
## Not run: set.seed(1973) ## One break test out <- BridgeChangeSim(ntime=20, predictor = 10, n.break=1, constant.p =0, varying.p = 0.4, dgp.only=TRUE) ## Fit multiple models for break number detection using Bayesian model comparison detect <- BreakDiagnostic(y=out$y.c, X=out$x.c) ## Look at the graph detect[[1]]; print(detect[[2]]) ## Two break test out <- BridgeChangeSim(ntime=20, predictor = 10, n.break=2, constant.p =0, varying.p = 0.4, dgp.only=TRUE) ## Fit multiple models for break number detection using Bayesian model comparison detect <- BreakDiagnostic(y=out$y.c, X=out$x.c) ## 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.