tlm-package {tlm} | R Documentation |
Effects under Linear, Logistic and Poisson Regression Models with Transformed Variables
Description
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.
Details
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 |
Author(s)
Jose Barrera-Gomez and Xavier Basagana
Maintainer: Jose Barrera-Gomez <jbarrera@creal.cat>
References
Barrera-Gomez J, Basagana X. Models with transformed variables: interpretation and software. Epidemiology. 2015;26(2):e16-17.
Examples
# 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)
[Package tlm version 0.1.5 Index]