Giter Site home page Giter Site logo

quickeffectsize's Introduction

QuickEffectSize

Sondre U. Solstad

Easy Effect Size Plots with options in R

QuickEffectSize is an easy interface for effect size plots in R. Using the Zelig package and ggplot2, it simulates and visualizes effect sizes of any zelig model: simply supply the model and the variable.

By default the plot shows 100 simulations for 100 values of the selected independent variable. These values are set to range from one standard deviation above to one standard deviation below the mean.

Written by Sondre U. Solstad, Princeton University (formerly [email protected] now [email protected]). Send me an email if you find this package useful or want to suggest an improvement or feature.

Installation instructions:

library(devtools)
install_github("sondreus/QuickEffectSize")

Example 1:

library(Zelig)
library(QuickEffectSize)

dat <- data.frame(y = rnorm(100), x1 = rnorm(100), x2 = rnorm(100))
dat$x3 <- dat$y + rnorm(100)
example.model <- zelig(y ~ x1 + x2 + x3, data = dat, model = "normal") 

qes(example.model, iv.var = "x3", xlab = "Using qes", ylab = "Productivity")

Example 2:

dat$y2 <- dat$y > 0.98
example.model <- zelig(y2 ~ x1 + x2 + x3, data = dat, model = "probit") 

qes(example.model, iv.var = "x3")

Arguments:

  • zelig.model - Fitted zelig model
  • iv.var - Independent variable.
  • xlab - (Optional) Label on x-axis. Defaults to independent variable name.
  • ylab - (Optional) Label on y-axis. Defaults to dependent variable name.
  • sim.n - (Optional) Number of simulations for each value of iv.var simulated. Defaults to 100.
  • range.n - (Optional) Number of different values of iv.var to simulate. Defaults to 100.
  • custom.range - (Optional) Vector of two values specifying a range within which different values of iv.var should be simulated.
  • return.pdata - (Optional) Should the data to construct the plot be returned instead of the plot itself? Defaults to FALSE.
  • progress - (Optional) Should progress be reported? Defaults to TRUE.
  • coord.ylim - (Optional) Sets limits on what part of the x.axis to display through ggplots coord_cartesian() function.
  • set.covar - (Optional) Option to specify values of other predictors in simulations.
  • transform.x - (Optional) If provided a function, transforms x-values according to function before plotting.
  • transform.y - (Optional) If provided a function, transforms y-values according to function before plotting.
  • ... - (Optional) Additional arguments passed to ggplot2's theme() function.

Citation:

Solstad, Sondre Ulvund (2019). QuickEffectSize: Quick Effect Size Plots in R. https://github.com/sondreus/QuickEffectSize#quickeffectsize

References:

Zelig: R Core Team. 2008. normal: Normal Regression for Continuous Dependent Variables in Christine Choirat, Christopher Gandrud, James Honaker, Kosuke Imai, Gary King, and Olivia Lau, "Zelig: Everyone's Statistical Software," http://zeligproject.org/

H. Wickham. ggplot2: Elegant Graphics for Data Analysis. Springer-Verlag New York, 2016.

quickeffectsize's People

Contributors

sondreus avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.