summary.MED: Summarizing output of study.

Description Usage Arguments Details Value Author(s) See Also Examples

Description

summary method for class "MED"

Usage

1
2
3
4
5
## S3 method for class 'MED'
summary(object, ...)

## S3 method for class 'summary.MED'
print(x, ...)

Arguments

object

An object of class "MED", usually a result of a call to MED.

x

An object of class "summary.MED", usually a result of a call to summary.MED.

...

Further arguments passed to or from methods.

Details

print.summary.MED prints a simplified output similar to print.summary.lm. The resulting table provides the point estimates, estimated standard errors, 95% Wald confidence intervals, the Z-statistic and the P-values for a Z-test.

Value

The function summary.MED returns a list with the following components

Estimate

A matrix with point estimates along with standard errors, confidence intervals etc. This is the matrix users see with the print.summary.RIPW function.

vcov

The variance-covariance matrix of the point estimates.

Conv

The convergence result of the object.

weights

The weights for each subject in each treatment arm. These are same as the weight component of the "RIPW" object.

call

The call passed on as an argument of the function which is equivalent to object$call.

Author(s)

Gary Chan

See Also

MED

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
library(MED)
#binary treatment and binary mediator

set.seed(25)
n <- 200
Z <- matrix(rnorm(4*n),ncol=4,nrow=n)
prop.e <- 1 / (1 + exp(Z[,1] - 0.5 * Z[,2] + 0.25*Z[,3] + 0.1 * Z[,4]))
treat <- rbinom(n, 1, prop.e)
prop.m <- 1 / (1 + exp(-(0.5 - Z[,1] + 0.5 * Z[,2] - 0.9 *Z [,3] + Z[,4] - 1.5 * treat)))
M <- rbinom(n, 1, prop.m)
Y <- 200 + treat + M + 27.4*Z[,1] + 13.7*Z[,2] +
          13.7*Z[,3] + 13.7*Z[,4] + rnorm(n)
X <- cbind(exp(Z[,1])/2,Z[,2]/(1+exp(Z[,1])),
          (Z[,1]*Z[,3]/25+0.6)^3,(Z[,2]+Z[,4]+20)^2)

#estimation of natural mediation effecs
fit1<-MED(Y,treat,M,X)
summary(fit1)

MED documentation built on May 2, 2019, 12:55 a.m.