Description Usage Arguments Details Value Author(s) References
View source: R/glm_indirect_jointest.R
The effect of exposure on the potential mediator is tested by linear regression model. And the joint effect of the exposure and mediator on the outcome is tested by logistic regression model.
1 |
data |
The tested data matrix with dimension of n by 3. The rows represent n subjects. The column 1, 2, 3 represent the data for the exposure variable, outome variable, and potential mediator, respectively. |
See https://stat.ethz.ch/R-manual/R-devel/library/stats/html/lm.html
https://stat.ethz.ch/R-manual/R-devel/library/stats/html/glm.html
pvalue |
A vector consisting of p-values of the two tests. |
Original lm: R Core Team and contributors worldwide
Original glm: R Core Team and contributors worldwide
Original lm: Chambers, J. M. (1992) Linear models. Chapter 4 of Statistical Models in S eds J. M. Chambers and T. J. Hastie, Wadsworth & Brooks/Cole.
Wilkinson, G. N. and Rogers, C. E. (1973). Symbolic descriptions of factorial models for analysis of variance. Applied Statistics, 22, 392–399. doi: 10.2307/2346786.
Original glm: Dobson, A. J. (1990) An Introduction to Generalized Linear Models. London: Chapman and Hall.
Hastie, T. J. and Pregibon, D. (1992) Generalized linear models. Chapter 6 of Statistical Models in S eds J. M. Chambers and T. J. Hastie, Wadsworth & Brooks/Cole.
McCullagh P. and Nelder, J. A. (1989) Generalized Linear Models. London: Chapman and Hall.
Venables, W. N. and Ripley, B. D. (2002) Modern Applied Statistics with S. New York: Springer.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.