summary.norm: Summarize information from EM or MCMC algorithms

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/norm2.R

Description

Method for summarizing the results from a call to the functions emNorm or mcmcNorm.

Usage

1
2
3
4
5
6
7
## S3 method for class 'norm'
summary(object, show.variables = (object$method == "EM"),
   show.patterns = (object$method == "EM"),
   show.params = (object$method =="EM"), ...) 

## S3 method for class 'summary.norm'
print(x, ...)

Arguments

object

an object of class "norm" which is produced as the result of a call to emNorm or mcmcNorm; see DETAILS below.

show.variables

if TRUE, then tables summarizing the response variables and covariates used in the model will be printed.

show.patterns

if TRUE, then a table summarizing the patterns of missingness will be printed.

show.params

if TRUE, then the final values of the parameters (estimates after the final iteration of EM or simulated values after the final iteration of MCMC) will be printed.

x

a result from summary.norm.

...

values to be passed to the methods.

Details

The result from a call to emNorm or mcmcNorm is an object of class "norm", which is a list containing results from the EM or MCMC run. The function summary.norm, which is invoked through the generic method summary, summarizes the information contained in this object.

The result from summary.norm is an object of class "summary.norm" which can be displayed or printed via the generic method print.

Value

A list that includes all the original components of obj plus some additional summaries that are printed via a call to the generic method print. These include:

x.table

a summary of all variables appearing in the model as predictors or covariates.

y.table

a summary of all variables appearing in the model as responses or outcomes.

em.summary

a summary of the results from the EM run, including: the number of iterations; whether EM converged; and an empirical estimate of the rate of convergence which estimates the worst fraction of missing information.

mcmc.summary

a summary of the results from the MCMC run, including: the number of iterations; whether imputations were created and, if so, how many; and whether parameter series were saved.

Author(s)

Joe Schafer Joseph.L.Schafer@census.gov

References

For more information about this function and other functions in the norm2 package, see User's Guide for norm2 in the library subdirectory doc.

See Also

emNorm, mcmcNorm

Examples

1
2
3
4
5
6
7
8
## run EM for cholesterol data and summarize
data(cholesterol)
emResult <- emNorm(cholesterol)
summary(emResult)

## run MCMC starting from the ML estimates and summarize
mcmcResult <- mcmcNorm(emResult)
summary(mcmcResult)

Example output

Predictor (X) variables:
      Mean SD Observed Missing Pct.Missing
CONST    1  0       28       0           0

Response (Y) variables:
       Mean       SD Observed Missing Pct.Missing
Y1 253.9286 47.71049       28       0     0.00000
Y2 230.6429 46.96745       28       0     0.00000
Y3 221.4737 43.18355       19       9    32.14286

Missingness patterns for response (Y) variables
   (. denotes observed value, m denotes missing value)
   (variable names are displayed vertically)
   (rightmost column is the frequency):
YYY
123
... 19
..m  9

Method:                             EM
Prior:                              "uniform"
Convergence criterion:              1e-05
Iterations:                         15
Converged:                          TRUE
Max. rel. difference:               8.5201e-06
-2 Loglikelihood:                   615.9902
-2 Log-posterior density:           615.9902
Worst fraction missing information: 0.4617

Estimated coefficients (beta):
            Y1       Y2       Y3
CONST 253.9286 230.6429 222.2371

Estimated covariance matrix (sigma):
          Y1       Y2        Y3
Y1 2194.9949 1454.617  835.3973
Y2 1454.6173 2127.158 1515.4584
Y3  835.3973 1515.458 1952.2182

Method:                        MCMC
Prior:                         "uniform"
Iterations:                    1000
Cycles per iteration:          1
Impute every k iterations, k = NULL
No. of imputations created:    0
series.worst present:          TRUE
series.beta  present:          TRUE
series.sigma present:          TRUE

norm2 documentation built on Feb. 12, 2021, 5:10 p.m.