Last data update: 2014.03.03

R: Display the results of 'jzs_med' in a figure.
plot.JZSMedR Documentation

Display the results of jzs_med in a figure.

Description

This function displays the estimates and posterior probabilities of path alpha, beta, and tau' in a mediation schema and thus renders a clear view of the structure in the data.

Usage

## S3 method for class 'JZSMed'
plot(x,...)

Arguments

x

the output of the jzs_med function.

...

additional arguments to be passed on to the plot method, such as graphical parameters (see par).

Author(s)

Michele B. Nuijten <m.b.nuijten@uvt.nl>, Ruud Wetzels, Dora Matzke, Conor V. Dolan, and Eric-Jan Wagenmakers.

See Also

jzs_med

Examples

## Not run: 
# simulate mediational data
a <- .5 
b <- .6
t_prime <- .3

X <- rnorm(50,0,1)
M <- a*X + rnorm(50,0,1)
Y <- t_prime*X + b*M + rnorm(50,0,1)

# save jzs_med output
res <- jzs_med(independent=X,dependent=Y,mediator=M)

# plot results
plot(res$main_result)

## End(Not run)

Results