extract: Extract the values within model output files.

Description Usage Arguments Value Functions Author(s) Examples

Description

Functions that extract the values within model output files.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
extract_scalar_string(regex, source)

extract_scalar_float(regex, source)

extract_named_wald(parameter_name, mplus_output)

extract_output_filename(mplus_output, regex = "\\bDATA:\\s+File = (.+);.*")

extract_free_parameter_count(
  mplus_output,
  regex = "\\bNumber of Free Parameters\\s+(\\d{1,})\\b"
)

extract_loglikelihood(
  mplus_output,
  regex = "\\bLoglikelihood\\s+H0 Value\\s+([-\\d\\.]+)\\b"
)

extract_scaling_correction(
  mplus_output,
  regex = "\\bH0 Scaling Correction Factor\\s+([-\\d\\.]+)\\s+for MLR\\b"
)

extract_aic(
  mplus_output,
  regex = "\\bAkaike \\(AIC\\)\\s+([-\\d\\.]+)\\b"
)

extract_bic(
  mplus_output,
  regex = "\\bBayesian \\(BIC\\)\\s+([-\\d\\.]+)\\b"
)

extract_bic_adjusted(
  mplus_output,
  regex = "\\bSample-Size Adjusted BIC\\s+([-\\d\\.]+)\\b"
)

Arguments

regex

Regular Expression pattern to capture and extract contents.

source

Text to run the regex against.

parameter_name

Variable name in Mplus output to extract.

mplus_output

Text containing model output. This should be the text read from the file (not a file path).

Value

A numeric value corresponding to the desired quantity.

Functions

Author(s)

Will Beasley

Examples

1
library(IalsaSynthesis) #Load the package into the current R session.

IALSA/IalsaSynthesis documentation built on April 20, 2021, 3:06 p.m.