Description Usage Arguments Details Author(s) See Also Examples

View source: R/GoF_S3methods.R

‘The `plot.GoF`

’ function produces plots to study the sequence of fitted models.

1 2 3 4 |

`x` |
an |

`add.line` |
logical; if ‘ |

`arg.line` |
a named list of graphical parameters passed to the function |

`add.text` |
logical; if ‘ |

`arg.text` |
a list of further parameters passed to the function |

`arg.points` |
a named list of graphical parameters passed to the function |

`...` |
additional graphical arguments passed to the functions |

`plot.GoF`

is the plotting method function of an **R** object of class ‘`GoF`

’, that is, the output of a goodness-of-fit function (see `AIC.cglasso`

, or `BIC.cglasso`

). This function produces a plot aimed both to evaluate the sequence of fitted models in terms of goodness-of-fit and to identify the optimal values of the tuning parameters.

If a tuning parameter is held fixed, then `plot.GoF`

produces a plot showing the chosen measure of goodness-of-fit as a function of the remaining tuning parameter. In this case, the optimal value is identified by a vertical dashed line. The degrees-of-freedom of the selected fitted model are also shown.

If the cglasso model is fitted using both a sequence of *rho* and *lambda* values, then `plot.GoF`

produces a contour plot and a triangle is used to identify the optimal pair of the two tuning parameters.

Luigi Augugliaro (luigi.augugliaro@unipa.it)

`cglasso`

, `AIC.cglasso`

, `BIC.cglasso`

, `summary.cglasso`

and `select.cglasso`

.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | ```
set.seed(123)
n <- 1000L
p <- 3L
q <- 2
b0 <- runif(p)
B <- matrix(runif(q * p), nrow = q, ncol = p)
X <- matrix(rnorm(n * q), nrow = n, ncol = q)
rho <- 0.3
Sigma <- outer(1L:p, 1L:p, function(i, j) rho^abs(i - j))
Z <- rcggm(n = n, b0 = b0, X = X, B = B, Sigma = Sigma, probl = 0.05, probr = 0.05)
out <- cglasso(. ~ ., data = Z, nlambda = 1L)
plot(AIC(out))
plot(BIC(out))
out <- cglasso(. ~ ., data = Z, nrho = 1L)
plot(AIC(out))
plot(BIC(out))
out <- cglasso(. ~ ., data = Z)
plot(AIC(out))
plot(BIC(out))
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.