Learn R Programming

mztwinreg (version 1.0-1)

log_dif: Test for intrapair logarithm-based phenotypic differences based on pair-level predictor variables

Description

Linear regression model to test whether the intrapair phenotypic differences in a continuous outcome (i.e., DNA methylation) in phenotype-discordant pairs are due to factors that are identical for both co-twins (i.e., a genotype). It is based on the work on Epigenetic Epidemiology by Tan, Q. (2013). It is similar to the abs_dif function in this package, inspired by Berg, K. (1994).

Usage

log_dif(formula, data, ...)

Arguments

formula
an object of class formula (or one that can be coerced to that class): a symbolic description of the model to be fitted. See formula.
data
a data frame containing the variables in the model.
...
additional arguments to be passed to either ols, from the rms package.

Value

log_dif returns an object of class c("ols" "rms" "lm").

Details

Similar to the model implemented in the abs_dif function in this package, log_dif tests whether the logarithm of the difference in an outcome measure in phenotype-discordant pairs is explained by paired-level exposures such as age. Of note, the affected co-twin is set before (one row above of) his/her co-twin in the data dataset. This model was originally proposed by Tan, Q. (2013) in the context of Epigenetic Epidemiology, to evaluate whether phenotype-discordant pairs have DNA methylation differences due to pair-level exposures.

References

Tan, Q. (2013). Epigenetic Epidemiology of Complex Diseases Using Twins. Medical Epigenetics, 1(1), 46-51.

Tan, Q., Frost, M., Heijmans, B. T., von Bornemann Hjelmborg, J., Tobi, E. W., Christensen, K., & Christiansen, L. (2014). Epigenetic signature of birth weight discordance in adult twins. BMC genomics, 15(1), 1062.

See Also

rms, ols

Examples

Run this code
data(flu_weight)

# The linear regression below tests whether DNA methylation differences at a
# given locus are predicted by pair level variables (such as gender, age 
# or both). 
(logarithm_differences <- log_dif(DNAmeth ~ Gender + Age, data=flu_weight))

Run the code above in your browser using DataLab