env_dif_logistic: Test for intrapair phenotypic differences in a binary outcome...

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

View source: R/env_dif_logistic.R

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

1
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.

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.

Value

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

Author(s)

Carlin, J. B. et al. (1994) proposed this model and implemented it in Stata. Aldo Cordova-Palomera adjusted the algorithm for R.

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

1
2
3
4
5
6
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))

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