env_dif: Test for intrapair phenotypic differences in an outcome based...

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/env_dif.R

Description

Linear regression model to test whether the intrapair differences in an outcome phenotype are due to intrapair differences in a predictor phenotype.

Usage

1

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 ols, from the rms package.

Details

Inspired by the implementation of Carlin, J. B. et al. (1994), this linear regression model without intercept tests allows evaluating whether intrapair differences in one or more predictor variables are related to intrapair differences in the outcome.

Value

env_dif returns an object of class "lm".

Author(s)

Developed by Aldo Cordova-Palomera, following Carlin, J. B. et al. (1994).

References

Carlin, J. B., Gurrin, L. C., Sterne, J. A., Morley, R., & Dwyer, T. (2005). Regression models for twin studies: a critical review. International Journal of Epidemiology, 34(5), 1089-1099.

See Also

lm

Examples

1
2
3
4
5
6
data(flu_weight)

# The linear regression below tests whether the intrapair differences in weight
# (in kilograms) of a given twin-pair predict its intrapair differences in DNA 
# methylation levels at a given genomic locus. 
summary(unique_env_linear <- env_dif(DNAmeth ~ Weight, data=flu_weight))

mztwinreg documentation built on May 2, 2019, 8:52 a.m.