Learn R Programming

mztwinreg (version 1.0-1)

env_dif_logistic: Test for intrapair phenotypic differences in a binary outcome based on intrapair-differences predictor variables

Description

Conditional logit model to test whether the intrapair differences in an outcome phenotype (binary variable) are due to intrapair differences in a predictor phenotype.

Usage

env_dif_logistic(formula, cluster = "default", 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.
cluster
a vector identifying the pairs in the sample. If not specified, the default value assumes that twin pairs are introduced in adjacent rows.
data
a data frame containing the variables in the model.
...
additional arguments to be passed to mclogit, from the mclogit package.

Value

env_dif_logistic returns an object of class c("mclogit", "lm").

Details

This is an R implementation of some code proposed by Carlin, J. B. et al. (1994) for Stata.

Note that this conditional logit model -either in the original version by Carlin, J. B. et al. (1994) or in the current R scripts- is not widely used and may require improvements.

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

mclogit, lm, lrm

Examples

Run this code
data(flu_weight)

# The linear regression below tests whether the intrapair differences in flu 
# presence (binary outcome) of a given twin-pair are predicted by its 
# differences in weight (in kilograms). 
summary(unique_env_logistic <- env_dif_logistic(FluNow ~ Weight, data=flu_weight))

Run the code above in your browser using DataLab