Learn R Programming

misty (version 0.5.0)

result.lpa: Result Table for Latent Profile Analysis Estimated in Mplus

Description

This function reads all Mplus output files from latent profile analysis in the subfolders to create a summary result table. By default, the function reads output files in all subfolders of the current working directory. Note that all output files need to be based on ANALYSIS: TYPE IS MIXTURE and each subfolder needs to contain more than one TYPE IS MIXTURE output file.

Usage

result.lpa(folder = getwd(), sort.n = TRUE, sort.p = TRUE,
           digits = 1, p.digits = 3, write = NULL, check = TRUE,
           output = TRUE)

Value

Returns an object, which is a list with following entries:

call

function call

type

type of analysis

output

list with all Mplus outputs

args

specification of function arguments

result

table with results of all Mplus outputs

Arguments

folder

a character string indicating the path of the folder containing subfolders with the Mplus output files. By default Mplus outputs in the subfolders of the current working directory are read.

sort.n

logical: if TRUE (default), result table is sorted according to the number of profiles within each folder.

sort.p

logical: if TRUE (default), class proportions are sorted decreasing.

digits

an integer value indicating the number of decimal places to be used for displaying results. Note that the scaling correction factor is displayed with digits plus 1 decimal places.

p.digits

an integer value indicating the number of decimal places to be used for displaying p-values, entropy value, and class proportions.

write

a character string for writing the results into a Excel file naming a file with or without file extension '.xlsx', e.g., "Results.xlsx" or "Results".

check

logical: if TRUE, argument specification is checked.

output

logical: if TRUE, output is shown.

Author

Takuya Yanagida takuya.yanagida@univie.ac.at

Details

The result summary table comprises following entries:

  • "Folder": Subfolder from which the group of Mplus outputs files were summarized.

  • "#Prof": Number of profiles (i.e., CLASSES ARE c(#Prof)).

  • "Conv": Model converged, TRUE or FALSE (i.e., THE MODEL ESTIMATION TERMINATED NORMALLY.

  • "#Param": Number of estimated parameters (i.e., Number of Free Parameters).

  • "logLik": Log-likelihood of the estimated model (i.e., H0 Value).

  • "Scale": Scaling correction factor (i.e., H0 Scaling Correction Factor for). Provided only when ESTIMATOR IS MLR.

  • "LL Rep": Best log-likelihood replicated, TRUE or FALSE (i.e., THE BEST LOGLIKELIHOOD VALUE HAS BEEN REPLICATED).

  • "AIC": Akaike information criterion (i.e., Akaike (AIC)).

  • "CAIC": Consistent AIC, not reported in the Mplut output, but simply BIC + #Param.

  • "BIC": Bayesian information criterion (i.e., Bayesian (BIC)).

  • "SABIC": Sample-size adjusted BIC (i.e., Sample-Size Adjusted BIC).

  • "LMR-LRT": Significance value (p-value) of the Vuong-Lo-Mendell-Rubin test (i.e., VUONG-LO-MENDELL-RUBIN LIKELIHOOD RATIO TEST). Provided only when OUTPUT: TECH11.

  • "A-LRT": Significance value (p-value) of the Adjusted Lo-Mendell-Rubin Test (i.e., LO-MENDELL-RUBIN ADJUSTED LRT TEST). Provided only when OUTPUT: TECH11.

  • "BLRT": Significance value (p-value) of the bootstrapped likelihood ratio test. Provided only when OUTPUT: TECH14.

  • "Entropy": Sample-size adjusted BIC (i.e., Entropy).

  • "p1": Class proportion of the first profile based on the estimated posterior probabilities (i.e., FINAL CLASS COUNTS AND PROPORTIONS).

  • "p2": Class proportion of the second profile based on the estimated posterior probabilities (i.e., FINAL CLASS COUNTS AND PROPORTIONS).

References

Masyn, K. E. (2013). Latent class analysis and finite mixture modeling. In T. D. Little (Ed.), The Oxford handbook of quantitative methods: Statistical analysis (pp. 551–611). Oxford University Press.

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

See Also

mplus.lpa, run.mplus, read.mplus, write.mplus

Examples

Run this code
if (FALSE) {
# Load data set "HolzingerSwineford1939" in the lavaan package
data("HolzingerSwineford1939", package = "lavaan")

# Run LPA with k = 1 to k = 6 profiles
mplus.lpa(HolzingerSwineford1939, ind = c("x1", "x2", "x3", "x4"),
          run.mplus = TRUE)

# Read Mplus output files, create result table, and write table
result.lpa(write = "LPA.xlsx")
}

Run the code above in your browser using DataLab