plot.JZSMed: Display the results of 'jzs_med' in a figure.

Description Usage Arguments Author(s) See Also Examples

View source: R/plot.JZSMed.R

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

1
2
## 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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## 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)

MicheleNuijten/BayesMed documentation built on Jan. 31, 2020, 7:45 a.m.