JNSiena5.3way: Calculates Johnson-Neyman significance regions and MOM...

View source: R/statFuncs.R

JNSiena5.3wayR Documentation

Calculates Johnson-Neyman significance regions and MOM signficance values (raw and Bonferroni-Holm adjusted) for SAOM 2-way interactions.

Description

Calculates Johnson-Neyman significance regions and MOM signficance values (raw and Bonferroni-Holm adjusted) for SAOM 2-way interactions.

Usage

JNSiena5.3way(
  siena07out,
  theta1,
  theta2,
  theta3 = NULL,
  thetaInt12,
  thetaInt13 = NULL,
  thetaInt23 = NULL,
  thetaInt123 = NULL,
  theta1Vals,
  theta2Vals,
  theta3Vals = NULL,
  control_fdr = FALSE,
  alpha = 0.05,
  round_res = 3,
  color_mid = "white",
  color_low = "#F05039",
  color_high = "#000066",
  color_values = "grey40",
  color_grid = "black",
  grid_density = 0.01,
  grid_spacing = 0.1,
  g_title = TRUE
)

Arguments

siena07out

An object of class 'sienaFit'

theta1

Number (from RSiena output) of 1st effect involved in a 2/3-way interaction effect included in 'siena07out'.

theta2

Number (from RSiena output) of 2st effect involved in a 2/3-way interaction effect included in 'siena07out'.

theta3

Number (from RSiena output) of 3rd effect involved in a 2/3-way interaction effect included in 'siena07out'. If it is not included in the function call, a 2-way interaction is assumed involving theta1 and theta2

thetaInt12

Number (from RSiena output) of the multiplicative interaction of the two effects identified by theta1 and theta2. This is always required.

thetaInt13

If theta3 is included, the number (from RSiena output) of the multiplicative interaction of the effects identified as theta1 and theta3.

thetaInt23

If theta3 is included, the number (from RSiena output) of the multiplicative interaction of the effects identified as theta2 and theta3.

thetaInt123

If theta3 is included, the number (from RSiena output) of the multiplicative interaction of the effects identified as theta1, theta2 and theta3.

control_fdr

Logical (T/F). Should the program output moderated significance results using Bonferroni-Holm-adjusted p-value criteria? Default= FALSE.

alpha

Number (default = 0.05) corresponding the 2-tailed significance level used to calculate whether a moderated effect is significant for a given value (for points in theta1vals, theta2vals, and theta3vals) ranges.

color_low

Color to use in heat maps of 3-way results for the low end of the moderated parameter values.

color_high

Color to use in heat maps of 3-way results for the high end of the moderated parameter values.

color_values

Color to use in heat maps of 3-way results for actual numerical values. This option appears not to be implemented yet.

color_grid

Color of the grid in the plot.

grid_density

(Default 0.01) How many values per unit area in the grid?

grid_spacing

(Default 0.1) How far apart should the gridlines be?

theta1vals

A vector of numerical values of effect 1 for which raw and B-H-adjusted significance should be obtained, applying both to effect 1 as a predictor (in the 1st output table) and as a moderator (in the 2nd output table).

theta2vals

A vector of numerical values of effect 2 for which raw and B-H-adjusted significance should be obtained, applying both to effect 2 as a predictor (in the 2nd output table) and as a moderator (in the 1st output table).

theta3vals

(Default NULL) A vector of numerical values of effect 3 for which significance should be obtained, applying both to effect 3 as a predictor and as a moderator.

roundres

Number of significant digits in output. Default = 3.

gtitle

(Default TRUE) Logical; add the primary predictor as a left-justified title to the graph?

Value

A list of 5 elements.

  1. 1. *thetas* Three matrices of the predicted theta values of each of predictors 1, 2, and 3, calculated on each pair of values in the range (or discrete values) provided for each of the remaining two moderators.

  2. 2. *standard_errors* SEs calculated conditionally in the same way as for the thetas.

  3. 3. *p_values* P-values calculated conditionally in the same way as for the thetas.

  4. 4. *significance* TRUE if the p-value falls within the Region Of Significance, as specified by alpha and, possibly also any adjustment for multiple tests; otherwise FALSE. Calculated in a matrix with the same conditions as for thetas, etc.

  5. 5. *plots* A list with three class gg and ggplot elements as its members, corresponding to each of the three predictors being taken as the primary predictor, with the same ordering as for the previous list elements (theta, etc.).


johninpdx/JMLUtils documentation built on Dec. 29, 2024, 1:27 p.m.