
This function creates object summaries used in reporting models, effects, and summarizing data.
1. Given an lm, will return a formated effect, including 95% CI
in square brackets, for one of the effects (specified by name in se). e.g.:
umxAPA
(m1, "wt") yields:
2. Given a dataframe, summaryAPA will return a table of correlations, with
the mean and SD of each variable as the last row. So,
umxAPA(mtcars[,c("cyl", "wt", "mpg", )])
yields a table of
correlations, means and SDs thus:
cyl | wt | mpg | |
cyl | 1 | 0.78 | -0.85 |
wt | 0.78 | 1 | -0.87 |
mpg | -0.85 | -0.87 | 1 |
3. Given obj and se, umxAPA returns a CI based on 1.96 times the se.
4. Given only a number as obj will be treated as a p-value as returned in APA format.
umxAPA(obj, se = NULL, std = FALSE, digits = 2, use = "complete",
min = 0.001, addComparison = NA, report = c("table", "html"),
lower = TRUE)
Either a model (lm), a beta-value, or a data.frame
If b is a model, then name of the parameter of interest, else the SE (standard-error)
If obj is an lm, whether to re-run the model on standardized data and report std betas
Round numbers to how many values
If obj is a data.frame, how to handle NA (default = "complete")
= .001 for a p-value, the smallest value to report numerically
for a p-value, whether to add "</=" default (NA) adds "<" if necessary
what to return (default = markdown table). Use "html" to open a web page table
whether to report on the lower triangle of correlations for a data.frame (Default = TRUE)
- string
Other Reporting Functions: loadings.MxModel
,
umxGetParameters
, umxSummary
,
umx_APA_pval
, umx_aggregate
,
umx_print
, umx_show
,
umx_time
, umx
# NOT RUN {
# Generate a formatted string describing a regression:
umxAPA(lm(mpg ~ wt + disp, mtcars))
umxAPA(lm(mpg ~ wt + disp, mtcars), "disp")
# Generate a summary table of correlations + Mean and SD:
umxAPA(mtcars[,1:3])
umxAPA(mtcars[,1:3], digits = 3)
umxAPA(mtcars[,1:3], lower = FALSE)
umxAPA(mtcars[,1:3], report = "html")
# Generate a CI string based on effect and se
umxAPA(.4, .3)
# format p-value
umxAPA(.0182613)
umxAPA(.000182613)
# }
Run the code above in your browser using DataLab