Learn R Programming

umx (version 1.9.1)

umx_APA_pval: Round p-values according to APA guidelines

Description

umx_APA_pval formats p-values, rounded correctly. So you get '< .001' instead of .000000002 or 1.00E-09.

You set the precision with digits. Optionally, you can add '=' '<' etc. The default for addComparison (NA) adds these when needed.

Usage

umx_APA_pval(p, min = 0.001, digits = 3, addComparison = NA)

Arguments

p

The p-value to round

min

Values below min will be reported as "< min"

digits

Number of decimals to which to round (default = 3)

addComparison

Whether to add '=' '<' etc. (NA adds when needed)

Value

- p-value formatted in APA style

See Also

- umxAPA, round

Other Reporting Functions: loadings.MxModel, tmx_is.identified, umxAPA, umxFactorScores, umxGetParameters, umxReduce, umxSummary, umx_aggregate, umx_parameters, umx_print, umx_show, umx_time, umx

Examples

Run this code
# NOT RUN {
umx_APA_pval(.052347)
umx_APA_pval(1.23E-3)
umx_APA_pval(1.23E-4)
umx_APA_pval(c(1.23E-3, .5))
umx_APA_pval(c(1.23E-3, .5), addComparison = TRUE)
# }

Run the code above in your browser using DataLab