Produce marginal GoF plot
marginal_gof_copula(
marginal,
observed,
name,
type,
treat,
return_data = FALSE,
grid = NULL,
...
)
Estimated marginal distribution represented by a list with three elements in the following order: the estimated cdf, pdf, and inverse cdf.
Observed values. These are used for the histogram.
Name of the endpoint (used in the plot title).
Type of endpoint: "ordinal"
or "continuous"
Value for the treatment indicator.
(boolean) Return the data used in the goodness-of-fit plot
(without the plot itself). This is useful when the user wants to customize the
plots, e.g., using ggplot2
. See Details.
(numeric) vector of values for the endpoint at which the model-based density is computed.
Extra arguments passed onto plot()
or hist()
for an ordinal
and continuous endpoint, respectively.
If return_data
is TRUE
, this function will return a data frame that can be
used to create customized plots. The following variables are present in the
returned data frame:
observed
: The empirical proportions (type = "ordinal"
). NA
for
type = "continuous"
.
upper_ci
, lower_ci
: Upper limit of the 95% confidence interval for the empirical
proportions. Defaults to NA
if type = "continuous"
.
value
: Value for the continuous or ordinal variable.
model_based
: Estimated model-based density (type = "continuous"
) or
proportions (type = "ordinal"
)
plot.vine_copula_fit()