Description Details Author(s) References Examples
Computation of effects under linear, logistic and Poisson regression models with transformed variables. Logarithm and power transformations are allowed. Effects can be displayed both numerically and graphically in both the original and the transformed space of the variables.
Package: | tlm |
Type: | Package |
Version: | 0.1.5 |
Date: | 2017-04-07 |
License: | GPL (>=2) |
URL: | http://www.creal.cat/xbasagana/software.html |
LazyLoad: | yes |
Jose Barrera-Gomez and Xavier Basagana
Maintainer: Jose Barrera-Gomez <jbarrera@creal.cat>
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 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | # linear regression model with log-log tansformation:
data(feld1)
head(feld1)
modcat <- tlm(y = logroom, x = logmattress, z = cat, ypow = 0, xpow = 0, data = feld1)
# print and summary:
modcat
summary(modcat)
# plotting the fitted model in the original space:
plot(modcat, xname = "Mattress levels", yname = "room levels")
# plotting the fitted model in the transformed space (and adding the observations):
plot(modcat, xname = "Mattress levels", yname = "room levels", type = "transformed",
observed = TRUE)
# diagnosis plot for the fitted model:
plot(modcat, type = "diagnosis")
# Expected geometric mean of the response, adjusting for variable 'cat':
MY(modcat)
# Expected mean of the transformed response, adjusting for variable 'cat':
MY(modcat, space = "transformed")
# Information on how to interpret effects:
effectInfo(modcat)
# Summary effect (default effect):
effect(modcat)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.