Description Usage Arguments Details Value Author(s) References See Also Examples
This function implements linear and logistic regression models to test for the association between an outcome phenotype and both the familial (genes + shared environment) and the unique environmental influences on a predictor variable.
1 2 |
formula |
an object of class |
BbBw |
the name of the predictor variable(s) (already in |
regression |
the type of regression model to be fitted. Use either |
cluster |
a vector identifying the pairs in the sample. If not specified, the default value assumes that twin pairs are introduced in adjacent rows. |
adjust |
a method to adjust for correlated responses (heteroskedasticity) of twin pairs. Use either |
robcov_method |
if |
bootcov_B |
if |
data |
a data frame containing the variables in the model. |
... |
additional arguments to be passed to either |
As shown by Carlin, J. B. et al. (1994), these cluster-based regression models allow parsing out familial and environmental factors contributing to the value of a predictor variable.
fam_env
returns an object of class
"rms", along with either c("ols", "lm") (linear models) or c("lrm", "glm") (logistic models).
Developed by Aldo Cordova-Palomera, following Carlin, J. B. et al. (1994).
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.
rms
, ols
, lrm
, robcov
, bootcov
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | data(flu_weight)
# The linear regression below tests whether the intrapair differences in
# DNA methylation of a given twin-pair are predicted by its differences in
# either familial (Bb) or environmental (Bw) factors influencing weight
# (in kilograms).
(fam_env_linear <- fam_env(DNAmeth ~ Gender + Age + Weight, BbBw="Weight",
regression='linear', data=flu_weight))
# The linear regression below tests whether the intrapair differences in
# flu (binary outcome) of a given twin-pair are predicted by its differences
# in either familial (Bb) or environmental (Bw) factors influencing weight
# (in kilograms).
(fam_env_logistic <- fam_env(FluNow ~ Gender + Age + Weight, BbBw="Weight",
regression='logistic', data=flu_weight))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.