copula_correlation: Inspect a fitted synthesizer
Description
copula_correlation() returns the (latent) copula correlation matrix of a
fitted model, or with what = "n_pair" the number of rows on which each
pairwise estimate is based; summary() returns a table describing how
each column is modelled.
Usage
copula_correlation(
object,
stratum = NULL,
include_missing = FALSE,
what = c("correlation", "n_pair")
)# S3 method for sp_synthesizer
summary(object, ...)
Value
copula_correlation(): a correlation matrix (or a count matrix
for what = "n_pair"). summary(): an
object of class summary.sp_synthesizer (a list with a columns data
frame).
Arguments
- object
A fitted sp_synthesizer.
- stratum
Optional stratum label for stratified models (as shown by
summary()); defaults to the pooled model.
- include_missing
Include the missingness indicators in the matrix?
- what
"correlation" (default) or "n_pair" (an integer matrix of
jointly observed rows; the diagonal is the number of observed values).
- ...
Unused.
Details
A pairwise correlation is treated as unidentified when the two variables
are observed together in fewer than 3 rows, or when its estimate is not
finite (a numerical safeguard). Such
entries are not estimated from data but completed as described in the
"Estimation details" section of fit_synthesizer(); n_pair alone
therefore does not identify all of them.
Examples
Run this codefit <- fit_synthesizer(airquality)
round(copula_correlation(fit), 2)
summary(fit)
Run the code above in your browser using DataLab