mplus.print {misty}R Documentation

Print Mplus Output

Description

This function prints the input command sections and the result sections of a Mplus output file (.out) on the R console. By default, the function prints (1) the input command section excluding the TITLE section, the OUTPUT section, and the names of the variables in the data set (NAMES option), and (2) selected result sections, e.g., short Summary of Analysis, short Summary of Data, Model Fit Information, and Model Results.

Usage

mplus.print(x, print = c("all", "input", "result"),
            input = c("all", "default", "data", "variable", "define",
                      "analysis", "model", "montecarlo", "mod.pop", "mod.cov",
                      "mod.miss", "message"),
             result = c("all", "default", "summary.analysis.short",
                        "summary.data.short", "random.starts", "summary.fit",
                        "mod.est", "fit", "class.count", "classif",
                        "mod.result", "total.indirect"),
             exclude = NULL, variable = FALSE, not.input = TRUE, not.result = TRUE,
             write = NULL, append = TRUE, check = TRUE, output = TRUE)

Arguments

x

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

print

a character vector indicating which results to show, i.e. "all" (default) for all results "input" for input command sections, and "result" for result sections.

input

a character vector specifiying Mplus input command sections

result

a character vector specifiying Mplus result sections included in the output (see 'Details').

exclude

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

variable

logical: if TRUE, names of the variables in the data set (NAMES option) specified in the VARIABLE: command section are shown. By default, names of the variables in the data set are excluded from the output unless all variables are used in the analysis (i.e., no USEVARIABLES option specified in the Mplus input file).

not.input

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

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

Input Command Sections

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

  • "title" for the TITLE command used to provide a title for the analysis.

  • "data" for the DATA command used to provide information about the data set to be analyzed.

  • "data.imp" for the DATA IMPUTATION command used to create a set of imputed data sets using multiple imputation methodology.

  • "data.wl" for the DATA WIDETOLONG command used to rearrange data from a multivariate wide format to a univariate long format.

  • "data.lw" for the DATA LONGTOWIDE command used to rearrange a univariate long format to a multivariate wide format.

  • "data.tp" for the DATA TWOPART command used to create a binary and a continuous variable from a continuous variable with a floor effect for use in two-part moding.

  • "data.miss" for the DATA MISSING command used to create a set of binary variables that are indicators of missing data or dropout for another set of variables.

  • "data.surv" for the DATA SURVIVAL command used to create variables for discrete-time survival modeling.

  • "data.coh" for the DATA COHORT command used to rearrange longitudinal data from a format where time points represent measurement occasions to a format where time points represent age or another time-related variable,

  • "variable" for the VARIABLE command used to provide information about the variables in the data set to be analyzed.

  • "define" for the DEFINE command used to transform existing variables and to create new variables.

  • "analysis" for the ANALYSIS command used to describe the technical details for the analysis.

  • "model" MODEL for the command used to destribe the model to be estimated.

  • "mod.ind" for the MODEL INDIRECT command used to request indirect and directd effects and their standard errors.

  • "mod.test" for the MODEL TEST command used to test restrictions on the parameters in the MODEL and MODEL CONSTRAINT commands using the Wald chi-square test.

  • "mod.prior" for the MODEL PRIORS command used with ESTIMATOR IS BAYES to specify the prior distribution for each parameter.

  • "montecarlo" for the MONTECARLO command used to set up and carry out a Monte Carlo simulation study.

  • "mod.pop" for the MODEL POPULATION command used to provivde the population parameter values to be used in data generation using the options of the MODEL command.

  • "mod.cov" for the MODEL COVERAGE used to provide the population parameter values to be used for computing coverage.

  • "mod.miss" for the MODEL MISSING command used to provide information about the population parameter values for the missing data model to be used in the generation of data.

  • "output" for the for the OUTPUT command used to request additional output beyond that included as the default.

  • "savedata" for the SAVEDATA command used to save the analysis data and/or a variety of model results in an ASCII file for future use.

  • "plot" for the PLOT command used to requested graphical displays of observed data and analysis results.

  • "message" for warning and error messsages that have been generated by the program after the input command sections.

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

Result Sections

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

  • "summary.analysis" for the SUMMARY OF ANALYSIS section..

  • "summary.analysis.short" for a short SUMMARY OF ANALYSIS section including the number of observations, nuber of groups, estimator, and optimization algorithm.

  • "summary.data" for the SUMMARY OF DATA section indicating.

  • "summary.data.short" for a short SUMMARY OF DATA section including number of clusters, average cluster size, and estimated intraclass correlations.

  • "prop.count" for the UNIVARIATE PROPORTIONS AND COUNTS FOR CATEGORICAL VARIABLES section.

  • "summary.censor" for the SUMMARY OF CENSORED LIMITS section.

  • "prop.zero" for the COUNT PROPORTION OF ZERO, MINIMUM AND MAXIMUM VALUES section.

  • "crosstab" for the CROSSTABS FOR CATEGORICAL VARIABLES section.

  • "summary.miss" for the SUMMARY OF MISSING DATA PATTERNS section.

  • "coverage" for the COVARIANCE COVERAGE OF DATA section.

  • "basic" for the RESULTS FOR BASIC ANALYSIS section.

  • "sample.stat" for the SAMPLE STATISTICS section.

  • "uni.sample.stat" for the UNIVARIATE SAMPLE STATISTICS section.

  • "random.starts" for the RANDOM STARTS RESULTS section.

  • "summary.fit" for the SUMMARY OF MODEL FIT INFORMATION section.

  • "mod.est" for the THE MODEL ESTIMATION TERMINATED NORMALLY message and warning messages from the model estimation.

  • "fit" for the MODEL FIT INFORMATION section.

  • "class.count" for the FINAL CLASS COUNTS AND PROPORTIONS FOR THE LATENT CLASSES section.

  • "ind.means" for the LATENT CLASS INDICATOR MEANS AND PROBABILITIES section.

  • "trans.prob" for the LATENT TRANSITION PROBABILITIES BASED ON THE ESTIMATED MODEL section.

  • "classif" for the CLASSIFICATION QUALITY section.

  • "mod.result" for the MODEL RESULTS and RESULTS FOR EXPLORATORY FACTOR ANALYSIS section.

  • "odds.ratio" for the LOGISTIC REGRESSION ODDS RATIO RESULTS section.

  • "prob.scale" for the RESULTS IN PROBABILITY SCALE section.

  • "ind.odds.ratio" for the LATENT CLASS INDICATOR ODDS RATIOS FOR THE LATENT CLASSES section.

  • "alt.param" for the ALTERNATIVE PARAMETERIZATIONS FOR THE CATEGORICAL LATENT VARIABLE REGRESSION section.

  • "irt.param" for the IRT PARAMETERIZATION section.

  • "brant.wald" for the BRANT WALD TEST FOR PROPORTIONAL ODDS section.

  • "std.mod.result" for the STANDARDIZED MODEL RESULTS section.

  • "rsquare" for the R-SQUARE section.

  • "total.indirect" for the TOTAL, TOTAL INDIRECT, SPECIFIC INDIRECT, AND DIRECT EFFECTS section.

  • "std.total.indirect" for the STANDARDIZED TOTAL, TOTAL INDIRECT, SPECIFIC INDIRECT, AND DIRECT EFFECTS section.

  • "std.mod.result.cluster" for the WITHIN-LEVEL STANDARDIZED MODEL RESULTS FOR CLUSTER section.

  • "fs.comparison" for the BETWEEN-LEVEL FACTOR SCORE COMPARISONS section.

  • "conf.mod.result" for the CONFIDENCE INTERVALS OF MODEL RESULTS section.

  • "conf.std.conf" for the CONFIDENCE INTERVALS OF STANDARDIZED MODEL RESULTS section.

  • "conf.total.indirect" for the CONFIDENCE INTERVALS OF TOTAL, TOTAL INDIRECT, SPECIFIC INDIRECT, AND DIRECT EFFECTS section.

  • "conf.odds.ratio" for the CONFIDENCE INTERVALS FOR THE LOGISTIC REGRESSION ODDS RATIO RESULTS section.

  • "modind" for the MODEL MODIFICATION INDICES section.

  • "resid" for the RESIDUAL OUTPUT section.

  • "logrank" for the LOGRANK OUTPUT section.

  • "tech1" for the TECHNICAL 1 OUTPUT section.

  • "tech2" for the TECHNICAL 2 OUTPUT section.

  • "tech3" for the TECHNICAL 3 OUTPUT section.

  • "h1.tech3" for the H1 TECHNICAL 3 OUTPUT section.

  • "tech4" for the TECHNICAL 4 OUTPUT section.

  • "tech5" for the TECHNICAL 5 OUTPUT section.

  • "tech6" for the TECHNICAL 6 OUTPUT section.

  • "tech7" for the TECHNICAL 7 OUTPUT section.

  • "tech8" for the TECHNICAL 8 OUTPUT section.

  • "tech9" for the TECHNICAL 9 OUTPUT section.

  • "tech10" for the TECHNICAL 10 OUTPUT section.

  • "tech11" for the TECHNICAL 11 OUTPUT section.

  • "tech12" for the TECHNICAL 12 OUTPUT section.

  • "tech13" for the TECHNICAL 13 OUTPUT section.

  • "tech14" for the TECHNICAL 14 OUTPUT section.

  • "tech15" for the TECHNICAL 15 OUTPUT section.

  • "tech16" for the TECHNICAL 16 OUTPUT section.

  • "svalues" for the MODEL COMMAND WITH FINAL ESTIMATES USED AS STARTING VALUES section.

  • "stat.fscores" for the SAMPLE STATISTICS FOR ESTIMATED FACTOR SCORES section.

  • "summary.fscores" for the SUMMARY OF FACTOR SCORES section.

  • "pv" for the SUMMARIES OF PLAUSIBLE VALUES section.

  • "plotinfo" for the PLOT INFORMATION section.

  • "saveinfo" for the SAVEDATA INFORMATION section.

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

Value

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

call

function call

type

type of analysis

x

chracter string or misty object

args

specification of function arguments

print

print objects

notprint

character vectors indicating the input commands and result sections not requested

result

list with input command sections (input) and result sections (input)

Author(s)

Takuya Yanagida

References

Muthen, L. K., & Muthen, B. O. (1998-2017). Mplus User's Guide (8th ed.). Muthen & Muthen.

See Also

read.mplus, write.mplus, mplus, mplus.update, mplus.run, mplus.lca

Examples

## Not run: 
#----------------------------------------------------------------------------
# Mplus Example 3.1: Linear Regression

# Example 1a: Default setting
mplus.print("ex3.1.out")

# Example 1b:  Print result section only
mplus.print("ex3.1.out", print = "result")

# Example 1c: Print MODEL RESULTS only
mplus.print("ex3.1.out", print = "result", result = "mod.result")

# Example 1d: Print UNIVARIATE SAMPLE STATISTICS in addition to the default setting
mplus.print("ex3.1.out", result = c("default", "uni.sample.stat"))

# Example 1e: Exclude MODEL FIT INFORMATION section
mplus.print("ex3.1.out", exclude = "fit")

# Example 1f: Print all result sections, but exclude MODEL FIT INFORMATION section
mplus.print("ex3.1.out", result  = "all", exclude = "fit")

Example 1g: Print result section in a different order
mplus.print("ex3.1.out", result  = c("mod.result", "fit", "summary.analysis"))

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

# Example 2
# Create misty.object
object <- mplus.print("ex3.1.out", output = FALSE)

# Print misty.object
mplus.print(object)

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

# # Example 3: Write Results into a text file
mplus.print("ex3.1.out", write = "Output_3-1.txt")

## End(Not run)

[Package misty version 0.6.5 Index]