Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

plotFEsim

Plot the results of a simulation of the fixed effects


Description

Plot the simulated fixed effects on a ggplot2 chart

Usage

plotFEsim(
  data,
  level = 0.95,
  stat = "median",
  sd = TRUE,
  intercept = FALSE,
  sigmaScale = NULL,
  oddsRatio = FALSE
)

Arguments

data

a data.frame generated by FEsim with simulations of the fixed effects of a merMod

level

the width of the confidence interval

stat

a character value indicating the variable name in data of the midpoint of the estimated interval, e.g. "mean" or "median"

sd

logical, indicating whether or not to plot error bars around the estimates (default is TRUE). Calculates the width of the error bars based on level and the variable named "sd" in data

intercept

logical, should the intercept be included, default is FALSE

sigmaScale

a numeric value to divide the estimate and the standard deviation by in the case of doing an effect size calculation

oddsRatio

logical, should the parameters be converted to odds ratios before plotting

Value

a ggplot2 plot of the coefficient effects

Examples

fm1 <- lmer(Reaction ~ Days + (Days | Subject), sleepstudy)
 (p1 <- plotFEsim(FEsim(fm1)))

merTools

Tools for Analyzing Mixed Effect Regression Models

v0.5.2
GPL (>= 2)
Authors
Jared E. Knowles [aut, cre], Carl Frederick [aut], Alex Whitworth [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.