Description Usage Arguments Details Value Author(s) References See Also Examples
View source: R/env_dif_logistic.R
Conditional logit model to test whether the intrapair differences in an outcome phenotype (binary variable) are due to intrapair differences in a predictor phenotype.
1 | env_dif_logistic(formula, cluster = "default", data, ...)
|
formula |
an object of class |
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 |
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.
env_dif_logistic
returns an object of class
c("mclogit", "lm").
Carlin, J. B. et al. (1994) proposed this model and implemented it in Stata. Aldo Cordova-Palomera adjusted the algorithm for R.
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.
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))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.