Description Usage Arguments Value Examples
Takes the results of DOPE and plots the distributions with usually good defaults.
1 |
output |
data.frame of simulations, usually from DOPE |
vname |
character or column index. Which distribution would you like to see? |
xmin |
numeric. Change the lower bound of plotted distribution. |
xmax |
numeric. Change the upper bound of plotted distribution. |
bw |
numeric. Set distribution bin width. |
shade |
logical. Shade the distribution according to R-squared values? |
include_naive |
logical. If it exists, indicate the naive regression coefficient? |
Returns a ggplot object of the simulated distribution of possible effects with numerical summaries.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | set.seed(8675309)
x_vars <- 5
n_obs <- 1000
corm <- RandomCormCPP(nvars = x_vars)
X_mat <- MASS::mvrnorm(n_obs, rep(0,x_vars), Sigma = corm, empirical = TRUE)
betas <- 1:x_vars
y <- X_mat
dat <- data.frame(y,X_mat)
mod <- lm(y ~ ., data=dat)
dope <- DOPE(mod, nsims = 3000, n.cores = parallel::detectCores())
plot_DOPE(dope,"V2")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.