Learn R Programming

tlm (version 0.2.0)

effectInfo: Interpretation of Effects in Linear, Logistic and Poisson Models with Transformed Variables

Description

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 and interpret it.

Usage

effectInfo(object)

# S3 method for effectInfo print(x, ...)

Value

A list with class "effectInfo" including the following items:

beta

regression coefficient estimate in the fitted model which is associated to the effect of the explanatory variable of interest on the response variable. NA corresponds to those models for which a summary effect does not exist.

Xincrease

type of change in the exploratory variable of interest (additive or realtive) for which a summary effect exists. NA corresponds to those models for which a summary effect does not exist.

effecttype

type of effect on the response variable for which a summary effect exists. NA corresponds to those models for which a summary effect is not available.

effectsize

formula for the summary effect size, if any. NA corresponds to those models for which a summary effect is not available.

furtherinfo

further information about how to interpret effects.

Arguments

object

object of class "tlm" obtained with the function tlm.

x

for print.effectInfo, an object of class "effectInfo" (an output of the effectInfo function).

...

additional arguments for print.effectInfo.

References

Barrera-Gomez J, Basagana X. Models with transformed variables: interpretation and software. Epidemiology. 2015;26(2):e16-17.

See Also

tlm, effect, MY.

Examples

Run this code
### Linear model with log transformation in the explanatory variable:
data(cotinine)
head(cotinine)
# model fitting:
modcot <- tlm(weight ~ 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(inv2glu ~ inv12tri, data = glucose, ypow = -2, xpow = -1/2)
modgluco
effectInfo(modgluco)

Run the code above in your browser using DataLab