Description Usage Arguments Value Author(s) References See Also Examples
This function provides information on interpreting effects in linear, logistic and Poisson models with transformed variables. Specifically, if a summary measure for the effect exists, the function details how to obtain it.
1 2 3 | effectInfo(object)
## S3 method for class 'effectInfo'
print(x, ...)
|
object |
an object of class " |
x |
an object of class " |
... |
further additional arguments for the |
beta |
regression coefficient estimate in the fitted model which is associated to the effect of the explanatory variable of interest on the response variable. |
Xincrease |
type of change in the exploratory variable of interest (additive or realtive) for which a summary effect exists. |
effecttype |
type of effect on the response variable for which a summary effect exists. |
effectsize |
formula for the summary effect size, if any. |
furtherinfo |
further information about how to interpret effects. |
Barrera-Gomez J and Basagana X.
Barrera-Gomez J, Basagana X. Models with transformed variables: interpretation and software. Epidemiology. 2015;26(2):e16-17.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ### Linear model with log transformation in the explanatory variable:
data(cotinine)
head(cotinine)
# model fitting:
modcot <- tlm(y = weight, x = logcotinine, data = cotinine, xpow = 0)
modcot
# information on interpreting the effect:
effectInfo(modcot)
### Linear model with no summary measure of effect:
data(glucose)
head(glucose)
# transformations Y^(-2) and X^(-1/2):
modgluco <- tlm(y = inv2glu, x = inv12tri, data = glucose, ypow = -2, xpow = -1/2)
modgluco
effectInfo(modgluco)
|
Loading required package: boot
cotinine logcotinine weight underweight
2 5.1584035 1.640627 3626 no
5 0.2909473 -1.234613 3672 no
11 4.1119142 1.413889 3779 no
12 3.0037959 1.099877 3540 no
14 5.9240779 1.779025 3179 no
17 7.3854370 1.999510 2494 yes
Linear regression fitted model in the transformed space
-------------------------------------------------------
Transformations:
In the explanatory variable: log
Call:
lm(formula = weight ~ logcotinine, data = cotinine)
Coefficients:
(Intercept) logcotinine
3406 -80
The effect of X on Y can be summarized with a single number as follows:
- Change in X: multiplicative of factor q (equivalently, adding an r = 100 * (q - 1)% to X)
- Type of effect on Y: additive change in the mean of Y
- Effect size: beta * log(q) units of Y
beta coefficient estimate:
Estimate Std. Error t value Pr(>|t|)
logcotinine -80.00108 14.94986 -5.351292 1.584903e-07
Further details can be obtained using effect().
trigly gluco inv12tri inv2glu
1 264 116 0.06154575 7.431629e-05
2 151 123 0.08137885 6.609822e-05
3 67 96 0.12216944 1.085069e-04
4 73 86 0.11704115 1.352082e-04
5 180 104 0.07453560 9.245562e-05
6 130 114 0.08770580 7.694675e-05
Linear regression fitted model in the transformed space
-------------------------------------------------------
Transformations:
In the response variable: power, exponent = -2
In the explanatory variable: power, exponent = -1/2
Call:
lm(formula = inv2glu ~ inv12tri, data = glucose)
Coefficients:
(Intercept) inv12tri
5.424e-05 5.715e-04
The effect of X on Y cannot be summarized with a single number.
Its behavior can be explored using effect().
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.