RSA.ST | R Documentation |

Calculates surface parameters a1 to a4, the stationary point, the principal axes, the eigenvectors and -values

RSA.ST( x = 0, y = 0, x2 = 0, xy = 0, y2 = 0, b0 = 0, SE = NULL, COV = NULL, df = NULL, model = "full" )

`x` |
Either an RSA object (returned by the |

`y` |
Y coefficient |

`x2` |
X^2 coefficient |

`xy` |
XY interaction coefficient |

`y2` |
Y^2 coefficient |

`b0` |
The intercept |

`SE` |
In case that the coefficients are provided directly (as parameters x, y, x2, y2, xy), SE can provide the standard errors of these estimates. SE has to be a named vector with exactly five elements with the names of the coefficients, e.g.: |

`COV` |
Covariances between parameters. COV has to be a named vector with exactly four elements with the names of four specific covariances, e.g.: |

`df` |
Degrees of freedom for the calculation of a1 to a4 confidence intervals. The df are the residual dfs of the model (df = n - estimated parameters). For the full second-order polynomial model, this is 'n - 6 - number of control variables' in a regular regression (the following parameters are estimated: Intercept, x, y, x2, xy, y2, all control variables). |

`model` |
If x is an RSA object, this parameter specifies the model from which to extract the coefficients |

No details so far.

Returns surface parameters a1 to a5. If an RSA object or SE, COV and df are provided, also significance test and standard errors of a1 to a5 are reported. The stationary point (X0, Y0, and Z0). First principal axis (PA) relative to the X-Y plane (p10 = intercept, p11 = slope), second PA (p20 = intercept, p21 = slope). M = eigenvectors, l = eigenvalues, L = lambda matrix as1X to as4X: surface parameters of the PA, relative to X values as1Y to as4Y: surface parameters of the PA, relative to Y values PA1.curvX: quadratic component of the first PA, as seen from X axis PA2.curvX: quadratic component of the second PA, as seen from X axis PA1.curv: quadratic component of the first PA, after optimal coord transformation PA2.curv: quadratic component of the second PA, after optimal coord transformation

Shanock, L. R., Baran, B. E., Gentry, W. A., Pattison, S. C., & Heggestad, E. D. (2010). Polynomial Regression with Response Surface Analysis: A Powerful Approach for Examining Moderation and Overcoming Limitations of Difference Scores. *Journal of Business and Psychology, 25*, 543-554. doi:10.1007/s10869-010-9183-4
Shanock, L. R., Baran, B. E., Gentry, W. A., & Pattison, S. C. (2014). Erratum to: Polynomial regression with response surface analysis: A powerful approach for examining moderation and overcoming limitations of difference scores. Journal of Business and Psychology, 29, . http://doi.org/10.1007/s10869-013-9317-6

`RSA`

# get surface parameters from known parameters # example from Shanock et al. (2010), p. 548, Table 2 RSA.ST(x=-.23, y=.77, x2=-.07, y2=-.10, xy=.27) ## Compute standard errors and p values for surface parameters ## from external regression coefficients: # standard errors for coefficients SE <- c(x=.09, y=.09, x2=.07, y2=.07, xy=.11) # covariances for specific coefficients: COV <- c(x_y= -.000, x2_y2 = .001, x2_xy = -.003, y2_xy = -.004) RSA.ST(x = .131, y = .382, x2 = .074, xy = .002, y2 = .039, SE=SE, COV=COV, df=181) # Get surface parameters from a computed RSA object set.seed(0xBEEF) n <- 300 err <- 2 x <- rnorm(n, 0, 5) y <- rnorm(n, 0, 5) df <- data.frame(x, y) df <- within(df, { diff <- x-y absdiff <- abs(x-y) SD <- (x-y)^2 z.diff <- diff + rnorm(n, 0, err) z.abs <- absdiff + rnorm(n, 0, err) z.sq <- SD + rnorm(n, 0, err) z.add <- diff + 0.4*x + rnorm(n, 0, err) z.complex <- 0.4*x + - 0.2*x*y + + 0.1*x^2 - 0.03*y^2 + rnorm(n, 0, err) }) r1 <- RSA(z.sq~x*y, df, models="full") RSA.ST(r1)

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.