summary.unvs.med | R Documentation |
This function presents the refined statistics results of the mediation effects on risk difference (RD),
odds ratio (OR) and risk difference (RR) scales
from function FormalEstmed
.
This function is applied on the resulting object of class "unvs.med"
from function FormalEstmed
.
The output shows the mean, standard error, t-statistics, p-value and confident interval of the effect estimates based on
bootstrapping estimations.
## S3 method for class 'unvs.med'
summary(object, form = "short", scale = "RD", ...)
object |
a resulting object of class |
form |
a character variable indicating the output form.
It can be |
scale |
a character variable of the effect scales. It can be |
... |
additional parameters passed to "summary". In addition, The function identifies it as the same string if the first letter is capital or all letters are capital.
For example, |
No return value, called for displaying the output of the estimation result.
# Running formal estimation
data(testdata)
med_model=glm(med~exp+C1+C2+C3, data=testdata, family=binomial) # Fitting mediator's model
out_model=lm(out~med*exp+C1+C2+C3, data=testdata) # Fitting outcome's model
r1 = FormalEstmed (med_model=med_model, out_model=out_model,
data=testdata, exposure = "exp") # Running formal estimation via bootstrapping
# Summary examples
summary(r1) # Summary of the default settings (Short form and on RD scales).
summary(r1, "long") # Summary of long form and on RD scales.
summary(r1, "long", "OR") # Summary of long form and on OR scales.
summary(r1, "long", "RR") # Summary of long form and on RR scales.
summary(r1, "long", "all") # Summary of long form and on all scales.
summary(r1, form="short", scale="all") # Summary of short form and on all scales.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.