Last chance! 50% off unlimited learning
Sale ends in
umxAPA creates summaries from a range of inputs. Use it for reporting lm models, effects, and summarizing data.
1. Given an lm, will return a formatted 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
,
tmx_is.identified
,
umxFactorScores
,
umxGetParameters
, umxReduce
,
umxSummary
, umx_APA_pval
,
umx_aggregate
,
umx_parameters
, umx_print
,
umx_show
, umx_time
,
umx
# NOT RUN {
# =============================
# = Report regression results =
# =============================
umxAPA(lm(mpg ~ wt + disp, mtcars))
umxAPA(lm(mpg ~ wt + disp, mtcars), "disp")
# ===============================================================
# = Generate summary of dataframe: Correlations + Means and SDs =
# ===============================================================
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 a p-value =
# ====================
umxAPA(.0182613)
umxAPA(.000182613)
# ====================
# = Format a p-value =
# ====================
data(twinData)
selDVs = c("wt1", "wt2")
mzData <- subset(twinData, zygosity %in% c("MZFF", "MZMM"))
dzData <- subset(twinData, zygosity %in% c("DZFF", "DZMM", "DZOS"))
x = cor.test(~ wt1 + wt2, data = mzData)
umxAPA(x)
# }
Run the code above in your browser using DataLab