knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "README-"
)

version <- as.vector(read.dcf('DESCRIPTION')[, 'Version']) 
version <- gsub('-', '.', version)

Build Status Last-changedate packageversion SWH

RSA

An R package for Response Surface Analysis

Installation

The stable CRAN version can be installed by:

install.packages("RSA")

Note that on macos, the use of X11 (including tcltk) requires XQuartz to be installed manually since it is no longer part of OS X. Always re-install XQuartz when upgrading your macos to a new major version.

The current development version can be installed by:

install.packages(c("devtools", "lavaan", "plyr", "ggplot2", "lattice", "tkrplot", "RColorBrewer", "rgl", "gridExtra", "aplpack", "fields", "qgraph"))
devtools::install_github("nicebread/RSA")

Questions? Go to our Google mailing list

Demo script (with built-in data set)

# if not already done: 
# install the RSA package
# (only has to be done once)
# install.packages("RSA")

# load the RSA package for
# the active session
library(RSA)

# open the help page
?RSA

## Motive congruency example
# load the built-in data set
data(motcon)

# Compute the RSA and save the result
# into the new variable r1
r1 <- RSA(postVA ~ ePow * iPow, data=motcon)

# Show summary of the RSA
print(r1)

# Compare all models
compare(r1, plot=TRUE)
aictab(r1, plot=TRUE)

# Show all RSA parameters with parametric
# SEs, p values, and CIs
getPar(r1, "coef", model="RR")

# Standard CIs
c1 <- confint(r1, model="RR")
c1

# Get bootstrapped confidence intervals
# (5000 bootstrap replications), 
# only from the RR model
c2 <- confint(r1, model="RR", method="boot", R=5000)
c2

# Plot the final model
plot(r1, model="RR", 
    xlab="Explicit power motive",
    ylab="Implicit power motive",
    zlab="Affective valence")


## Additional functions
# contour plot
plot(r1, model="RR", type="contour")

# interactive, rotatable 3d plot
plot(r1, model="RR", type="interactive")

# open an interactive widget with control
# sliders for regression weights
demoRSA()

Interactive plotting of polynomial surfaces

Not part of this package, but related: you can create polynomial surface plots with this interactive app:

Maintainers

Felix Schönbrodt

Sarah Humberg



nicebread/RSA documentation built on April 19, 2024, 6:38 p.m.