plot.lmgce {GCEstim}R Documentation

Plot Diagnostics for a lmgce Object

Description

Seven plots (selectable by which) are currently available to evaluate a lmgce object: a plot of the Estimates and confidence intervals; four plots of supports against Prediction Error, Estimates, Normalized Entropy and Precision Error; two plots of GCE reestimation against Prediction and Precision Errors. Note that plots regarding Precision Error are only produced if the argument coef is not NULL.

Usage

## S3 method for class 'lmgce'
plot(
  x,
  type = c("ggplot2", "plotly"),
  which = 1:7,
  ci.level = 0.95,
  ci.method = c("z", "percentile", "basic"),
  boot.B = ifelse(x$boot.B == 0, 100, x$boot.B),
  boot.method = x$boot.method,
  coef = NULL,
  OLS = TRUE,
  NormEnt = TRUE,
  caption = list(paste0("Estimates (", ci.method[1], " ", ci.level * 100, "% CI)"),
    "Prediction Error vs supports", "Estimates vs supports",
    "Normalized Entropy vs supports", "Precision Error vs supports",
    "Prediction Error vs GCE reestimation", "Precision Error vs GCE reestimation"),
  ...
)

Arguments

x

Fitted lmgce model object.

type

One of c("ggplot2", "plotly"). "ggplot2" is used by default.

which

A subset of the numbers 1:7.

ci.level

the confidence level (0,1) required to compute the confidence interval.

ci.method

the method used to compute the confidence interval. One of c("z","percentile", "basic"). The default is method = "z".

boot.B

A single positive integer greater or equal to 10 for the number of bootstrap replicates for the computation of the bootstrap confidence interval(s), to be used when method = c("percentile", "basic") and when object was created with boot.B = 0. The default is boot.B = 100 when the object has no previous sampling information and boot.B = object$boot.B otherwise, which corresponds to the boot.B given to lmgce when the object was created.

boot.method

Method used for bootstrapping. One of c("residuals", "cases", "wild") which corresponds to resampling on residuals, on individual cases or on residuals multiplied by a N(0,1) variable, respectively. The default is boot.method = object$boot.method.

coef

A vector of true coefficients to be used when which = c(5,7).

OLS

Boolean value. if TRUE, the default, plots the OLS results.

NormEnt

Boolean value. if TRUE, the default, plots the normalized entropy.

caption

Captions to appear above the plots; character vector or list of valid graphics annotations, see as.graphicsAnnot, of length 7, the j-th entry corresponding to which[j]. Can be set to "" or NA to suppress all captions.

...

additional arguments.

Value

A named list of ggplot or plotly objects, each representing a separate plot.

Author(s)

Jorge Cabral, jorgecabral@ua.pt

See Also

lmgce

Examples


res_gce_package <-
  lmgce(y ~ .,
        data = dataGCE,
        boot.B = 50,
        seed = 230676)

plot(res_gce_package)


[Package GCEstim version 0.1.0 Index]