blimp.print: Print Blimp Output

View source: R/blimp.print.R

blimp.printR Documentation

Print Blimp Output

Description

This function prints the result sections of a Blimp output file (.blimp-out) on the R console. By default, the function prints selected result sections, i.e., Algorithmic Options Specified, Data Information, Model Information, Warning Messages, Outcome Model Estimates, and Generated Parameters.

Usage

blimp.print(x,
            result = c("all", "default", "algo.options", "data.info",
                       "model.info", "warn.mess", "out.model", "gen.param"),
            exclude = NULL, color = c("none", "blue", "violet"),
            style = c("bold", "regular"), not.result = TRUE,
            write = NULL, append = TRUE, check = TRUE, output = TRUE)

Arguments

x

a character string indicating the name of the Blimp output file with or without the file extension .blimp-out, e.g., "Blimp_Output.blimp-out" or "Blimp_Output". Alternatively, a misty.object of type blimp can be specified, i.e., result object of the blimp.print() function.

result

a character vector specifying Blimp result sections included in the output (see 'Details').

exclude

a character vector specifying Blimp input command or result sections excluded from the output (see 'Details').

color

a character vector with two elements indicating the colors used for the main headers (e.g., "ALGORITHMIC OPTIONS SPECIFIED:"), and for the headers Outcome Variable: and Missing predictor:, Latent Variable:, and Covariance Matrix:.

style

a character vector with two elements indicating the style used for headers (e.g., "ALGORITHMIC OPTIONS SPECIFIED:"), and for the main headers (e.g., "ALGORITHMIC OPTIONS SPECIFIED:"), and for the headers Outcome Variable: and Missing predictor:, Complete variable:, Latent Variable:, and Covariance Matrix:.

not.result

logical: if TRUE (default), character vector indicating the result sections not requested are shown on the console.

write

a character string naming a file for writing the output into a text file with file extension ".txt" (e.g., "Output.txt").

append

logical: if TRUE (default), output will be appended to an existing text file with extension .txt specified in write, if FALSE existing text file will be overwritten.

check

logical: if TRUE (default), argument specification is checked.

output

logical: if TRUE (default), output is shown on the console.

Details

Result Sections

Following result sections can be selected by using the result argument or excluded by using the exclude argument:

  • "algo.options" for the ALGORITHMIC OPTIONS SPECIFIED section

  • "simdat.summary" for the SIMULATED DATA SUMMARIES section

  • "order.simdat" for the VARIABLE ORDER IN SIMULATED DATA section

  • "burnin.psr" for the BURN-IN POTENTIAL SCALE REDUCTION (PSR) OUTPUT section

  • "mh.accept" for the METROPOLIS-HASTINGS ACCEPTANCE RATES section

  • "data.info" for the DATA INFORMATION section

  • "var.imp" for the VARIABLES IN IMPUTATION MODEL section

  • "model.info" for the MODEL INFORMATION section

  • "param.label" for the PARAMETER LABELS section

  • "warn.mess" for the WARNING MESSAGES section

  • "fit" for the MODEL FIT section

  • "cor.resid" for the CORRELATIONS AMONG RESIDUALS section

  • "out.model" for the OUTCOME MODEL ESTIMATES section

  • "pred.model" for the PREDICTOR MODEL ESTIMATES section

  • "gen.param" for the GENERATED PARAMETERS section

  • "order.impdat" for the VARIABLE ORDER IN IMPUTED DATA section

Note that all result sections are requested by specifying result = "all". The result argument is also used to select one (e.g., result = "algo.options") or more than one result sections (e.g., result = c("algo.options", "fit")), or to request result sections in addition to the default setting (e.g., result = c("default", "fit")). The exclude argument is used to exclude result sections from the output (e.g., exclude = "algo.options").

Value

Returns an object of class misty.object, which is a list with following entries:

call

function call

type

type of analysis

x

character string or misty object

args

specification of function arguments

print

print objects

notprint

character vectors indicating the result sections not requested

result

list with Blimp version (blimp) and result sections (result)

Author(s)

Takuya Yanagida

References

Keller, B. T., & Enders, C. K. (2023). Blimp user’s guide (Version 3). Retrieved from www.appliedmissingdata.com/blimp

See Also

blimp, blimp.update, blimp.run, blimp.plot, blimp.bayes

Examples

## Not run: 
#----------------------------------------------------------------------------
# Blimp Example 4.3: Linear Regression

# Example 1a: Default setting
blimp.print("Ex4.3.blimp-out")

# Example 1c: Print OUTCOME MODEL ESTIMATES only
blimp.print("Ex4.3.blimp-out", result = "out.model")

# Example 1d: Print MODEL FIT in addition to the default setting
blimp.print("Ex4.3.blimp-out", result = c("default", "fit"))

# Example 1e: Exclude DATA INFORMATION section
blimp.print("Ex4.3.blimp-out", exclude = "data.info")

# Example 1f: Print all result sections, but exclude MODEL FIT section
blimp.print("Ex4.3.blimp-out", result = "all", exclude = "fit")

# Example 1g: Print result section in a different order
blimp.print("Ex4.3.blimp-out", result = c("model.info", "fit", "algo.options"))

#----------------------------------------------------------------------------
# misty.object of type 'blimp.print'

# Example 2
# Create misty.object
object <- blimp.print("Ex4.3.blimp-out", output = FALSE)

# Print misty.object
blimp.print(object)

#----------------------------------------------------------------------------
# Write Results

# Example 3: Write Results into a text file
blimp.print("Ex4.3.blimp-out", write = "Output_4-3.txt")

## End(Not run)

misty documentation built on Oct. 24, 2024, 5:10 p.m.

Related to blimp.print in misty...