| 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 |
print |
a character vector indicating which results to show, i.e.
|
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 |
not.input |
logical: if |
not.result |
logical: if |
write |
a character string naming a file for writing the output into
a text file with file extension |
append |
logical: if |
check |
logical: if |
output |
logical: if |
Details
- Input Command Sections
Following input command sections can be selected by using the
inputargument or excluded by using theexcludeargument:"title"for theTITLEcommand used to provide a title for the analysis."data"for theDATAcommand used to provide information about the data set to be analyzed."data.imp"for theDATA IMPUTATIONcommand used to create a set of imputed data sets using multiple imputation methodology."data.wl"for theDATA WIDETOLONGcommand used to rearrange data from a multivariate wide format to a univariate long format."data.lw"for theDATA LONGTOWIDEcommand used to rearrange a univariate long format to a multivariate wide format."data.tp"for theDATA TWOPARTcommand 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 theDATA MISSINGcommand used to create a set of binary variables that are indicators of missing data or dropout for another set of variables."data.surv"for theDATA SURVIVALcommand used to create variables for discrete-time survival modeling."data.coh"for theDATA COHORTcommand 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 theVARIABLEcommand used to provide information about the variables in the data set to be analyzed."define"for theDEFINEcommand used to transform existing variables and to create new variables."analysis"for theANALYSIScommand used to describe the technical details for the analysis."model"MODELfor the command used to destribe the model to be estimated."mod.ind"for theMODEL INDIRECTcommand used to request indirect and directd effects and their standard errors."mod.test"for theMODEL TESTcommand used to test restrictions on the parameters in theMODELandMODEL CONSTRAINTcommands using the Wald chi-square test."mod.prior"for theMODEL PRIORScommand used withESTIMATOR IS BAYESto specify the prior distribution for each parameter."montecarlo"for theMONTECARLOcommand used to set up and carry out a Monte Carlo simulation study."mod.pop"for theMODEL POPULATIONcommand used to provivde the population parameter values to be used in data generation using the options of theMODELcommand."mod.cov"for theMODEL COVERAGEused to provide the population parameter values to be used for computing coverage."mod.miss"for theMODEL MISSINGcommand 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 theOUTPUTcommand used to request additional output beyond that included as the default."savedata"for theSAVEDATAcommand used to save the analysis data and/or a variety of model results in an ASCII file for future use."plot"for thePLOTcommand 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". Theinputargument 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")). Theexcludeargument 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
inputargument or excluded by using theexcludeargument:"summary.analysis"for theSUMMARY OF ANALYSISsection.."summary.analysis.short"for a shortSUMMARY OF ANALYSISsection including the number of observations, nuber of groups, estimator, and optimization algorithm."summary.data"for theSUMMARY OF DATAsection indicating."summary.data.short"for a shortSUMMARY OF DATAsection including number of clusters, average cluster size, and estimated intraclass correlations."prop.count"for theUNIVARIATE PROPORTIONS AND COUNTS FOR CATEGORICAL VARIABLESsection."summary.censor"for theSUMMARY OF CENSORED LIMITSsection."prop.zero"for theCOUNT PROPORTION OF ZERO, MINIMUM AND MAXIMUM VALUESsection."crosstab"for theCROSSTABS FOR CATEGORICAL VARIABLESsection."summary.miss"for theSUMMARY OF MISSING DATA PATTERNSsection."coverage"for theCOVARIANCE COVERAGE OF DATAsection."basic"for theRESULTS FOR BASIC ANALYSISsection."sample.stat"for theSAMPLE STATISTICSsection."uni.sample.stat"for theUNIVARIATE SAMPLE STATISTICSsection."random.starts"for theRANDOM STARTS RESULTSsection."summary.fit"for theSUMMARY OF MODEL FIT INFORMATIONsection."mod.est"for theTHE MODEL ESTIMATION TERMINATED NORMALLYmessage and warning messages from the model estimation."fit"for theMODEL FIT INFORMATIONsection."class.count"for theFINAL CLASS COUNTS AND PROPORTIONS FOR THE LATENT CLASSESsection."ind.means"for theLATENT CLASS INDICATOR MEANS AND PROBABILITIESsection."trans.prob"for theLATENT TRANSITION PROBABILITIES BASED ON THE ESTIMATED MODELsection."classif"for theCLASSIFICATION QUALITYsection."mod.result"for theMODEL RESULTSandRESULTS FOR EXPLORATORY FACTOR ANALYSISsection."odds.ratio"for theLOGISTIC REGRESSION ODDS RATIO RESULTSsection."prob.scale"for theRESULTS IN PROBABILITY SCALEsection."ind.odds.ratio"for theLATENT CLASS INDICATOR ODDS RATIOS FOR THE LATENT CLASSESsection."alt.param"for theALTERNATIVE PARAMETERIZATIONS FOR THE CATEGORICAL LATENT VARIABLE REGRESSIONsection."irt.param"for theIRT PARAMETERIZATIONsection."brant.wald"for theBRANT WALD TEST FOR PROPORTIONAL ODDSsection."std.mod.result"for theSTANDARDIZED MODEL RESULTSsection."rsquare"for theR-SQUAREsection."total.indirect"for theTOTAL, TOTAL INDIRECT, SPECIFIC INDIRECT, AND DIRECT EFFECTSsection."std.total.indirect"for theSTANDARDIZED TOTAL, TOTAL INDIRECT, SPECIFIC INDIRECT, AND DIRECT EFFECTSsection."std.mod.result.cluster"for theWITHIN-LEVEL STANDARDIZED MODEL RESULTS FOR CLUSTERsection."fs.comparison"for theBETWEEN-LEVEL FACTOR SCORE COMPARISONSsection."conf.mod.result"for theCONFIDENCE INTERVALS OF MODEL RESULTSsection."conf.std.conf"for theCONFIDENCE INTERVALS OF STANDARDIZED MODEL RESULTSsection."conf.total.indirect"for theCONFIDENCE INTERVALS OF TOTAL, TOTAL INDIRECT, SPECIFIC INDIRECT, AND DIRECT EFFECTSsection."conf.odds.ratio"for theCONFIDENCE INTERVALS FOR THE LOGISTIC REGRESSION ODDS RATIO RESULTSsection."modind"for theMODEL MODIFICATION INDICESsection."resid"for theRESIDUAL OUTPUTsection."logrank"for theLOGRANK OUTPUTsection."tech1"for theTECHNICAL 1 OUTPUTsection."tech2"for theTECHNICAL 2 OUTPUTsection."tech3"for theTECHNICAL 3 OUTPUTsection."h1.tech3"for theH1 TECHNICAL 3 OUTPUTsection."tech4"for theTECHNICAL 4 OUTPUTsection."tech5"for theTECHNICAL 5 OUTPUTsection."tech6"for theTECHNICAL 6 OUTPUTsection."tech7"for theTECHNICAL 7 OUTPUTsection."tech8"for theTECHNICAL 8 OUTPUTsection."tech9"for theTECHNICAL 9 OUTPUTsection."tech10"for theTECHNICAL 10 OUTPUTsection."tech11"for theTECHNICAL 11 OUTPUTsection."tech12"for theTECHNICAL 12 OUTPUTsection."tech13"for theTECHNICAL 13 OUTPUTsection."tech14"for theTECHNICAL 14 OUTPUTsection."tech15"for theTECHNICAL 15 OUTPUTsection."tech16"for theTECHNICAL 16 OUTPUTsection."svalues"for theMODEL COMMAND WITH FINAL ESTIMATES USED AS STARTING VALUESsection."stat.fscores"for theSAMPLE STATISTICS FOR ESTIMATED FACTOR SCORESsection."summary.fscores"for theSUMMARY OF FACTOR SCORESsection."pv"for theSUMMARIES OF PLAUSIBLE VALUESsection."plotinfo"for thePLOT INFORMATIONsection."saveinfo"for theSAVEDATA INFORMATIONsection.
Note that all result sections are requested by specifying
result = "all". Theresultargument 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")). Theexcludeargument 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 ( |
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)