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

doNonlinearEffectsAnalysis

Do a nonlinear effects analysis


Description

[Maturing]

Usage

doNonlinearEffectsAnalysis(
 .object            = NULL,
 .dependent         = NULL, 
 .independent       = NULL,
 .moderator         = NULL,
 .n_steps           = 100,
 .values_moderator  = c(-2, -1, 0, 1, 2),
 .value_independent = 0,
 .alpha             = 0.05
 )

Arguments

.object

An R object of class cSEMResults resulting from a call to csem().

.dependent

Character string. The name of the dependent variable.

.independent

Character string. The name of the independent variable.

.moderator

Character string. The name of the moderator variable.

.n_steps

Integer. A value giving the number of steps (the spotlights, i.e., values of .moderator in surface analysis or floodlight analysis) between the minimum and maximum value of the moderator. Defaults to 100.

.values_moderator

A numeric vector. The values of the moderator in a the simple effects analysis. Typically these are difference from the mean (=0) measured in standard deviations. Defaults to c(-2, -1, 0, 1, 2).

.value_independent

Integer. Only required for floodlight analysis; The value of the independent variable in case that it appears as a higher-order term.

.alpha

An integer or a numeric vector of significance levels. Defaults to 0.05.

Details

Calculate the expected value of the dependent variable conditional on the values of an independent variables and a moderator variable. All other variables in the model are assumed to be zero, i.e., they are fixed at their mean levels. Moreover, it produces the input for the floodlight analysis.

Value

A list of class cSEMNonlinearEffects with a corresponding method for plot(). See: plot.cSEMNonlinearEffects().

See Also

Examples

## Not run: 
model_Int <- "
# Measurement models
INV =~ INV1 + INV2 + INV3 +INV4
SAT =~ SAT1 + SAT2 + SAT3
INT =~ INT1 + INT2

# Structrual model containing an interaction term.
INT ~ INV + SAT + INV.SAT
"
  
# Estimate model
out <- csem(.data = Switching, .model = model_Int,
            # ADANCO settings
            .PLS_weight_scheme_inner = 'factorial',
            .tolerance = 1e-06,
            .resample_method = 'bootstrap'
)
  
# Do nonlinear effects analysis
neffects <- doNonlinearEffectsAnalysis(out, 
                                       .dependent = 'INT',
                                       .moderator = 'INV',
                                       .independent = 'SAT') 

# Get an overview
neffects

# Simple effects plot
plot(neffects, .plot_type = 'simpleeffects')

# Surface plot using plotly
plot(neffects, .plot_type = 'surface', .plot_package = 'plotly')

# Surface plot using persp
plot(neffects, .plot_type = 'surface', .plot_package = 'persp')

# Floodlight analysis
plot(neffects, .plot_type = 'floodlight')

## End(Not run)

cSEM

Composite-Based Structural Equation Modeling

v0.4.0
GPL-3
Authors
Manuel E. Rademaker [aut, cre] (<https://orcid.org/0000-0002-8902-3561>), Florian Schuberth [aut] (<https://orcid.org/0000-0002-2110-9086>), Tamara Schamberger [ctb] (<https://orcid.org/0000-0002-7845-784X>), Michael Klesel [ctb] (<https://orcid.org/0000-0002-2884-1819>), Theo K. Dijkstra [ctb], Jörg Henseler [ctb] (<https://orcid.org/0000-0002-9736-3048>)
Initial release
2021-04-09

We don't support your browser anymore

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