umx (version 4.0.0)

umxSummarizeTwinData: Summarize twin data

Description

Produce a summary of wide-format twin data, showing the number of individuals, the mean and SD for each trait, and the correlation for each twin-type.

Set MZ and DZ to summarize the two-group case.

Usage

umxSummarizeTwinData(
  data = NULL,
  selVars = NULL,
  sep = "_T",
  zyg = "zygosity",
  MZ = NULL,
  DZ = NULL,
  MZFF = "MZFF",
  DZFF = "DZFF",
  MZMM = "MZMM",
  DZMM = "DZMM",
  DZOS = "DZOS",
  digits = 2,
  report = c("markdown", "html")
)

Arguments

data

The twin data.

selVars

Collection of variables to report on, e.g. c("wt", "ht").

sep

The separator string that will turn a variable name into a twin variable name, default= "_T" for wt_T1 and wt_T2.

zyg

The zygosity variable in the dataset, default = "zygosity".

MZ

Set level in zyg corresponding to MZ for two group case (defaults to using 5-group case).

DZ

Set level in zyg corresponding to DZ for two group case (defaults to using 5-group case).

MZFF

The level of zyg corresponding to MZ FF pairs: default= "MZFF".

DZFF

The level of zyg corresponding to DZ FF pairs: default= "DZFF".

MZMM

The level of zyg corresponding to MZ MM pairs: default= "MZMM".

DZMM

The level of zyg corresponding to DZ MM pairs: default= "DZMM".

DZOS

The level of zyg corresponding to DZ OS pairs: default= "DZOS".

digits

Rounding precision of the report (default 2).

report

What to return (default = 'markdown'). Use 'html' to open a web table.

Value

  • formatted table, e.g. in markdown.

References

See Also

Other Twin Reporting Functions: umxPlotCP(), umxPlotDoC(), umxReduceACE(), umxReduceGxE(), umxReduce(), umxSummaryACEcov(), umxSummaryACEv(), umxSummaryACE(), umxSummaryCP(), umxSummaryDoC(), umxSummaryGxEbiv(), umxSummaryGxE(), umxSummaryIP(), umxSummarySexLim(), umxSummarySimplex(), umx

Examples

Run this code
# NOT RUN {
data(twinData)
umxSummarizeTwinData(twinData, sep = "", selVars = c("wt", "ht"))
MZs = c("MZMM", "MZFF"); DZs = c("DZFF","DZMM", "DZOS")
umxSummarizeTwinData(twinData, sep = "", selVars = c("wt", "ht"), MZ = MZs, DZ = DZs)
# }

Run the code above in your browser using DataLab