residualrwa | R Documentation |
Method to detecting influential variables in nonlinear model with residualized relative weight analysis.
residualrwa( response, control = NULL, fixed = NULL, free, data, family = "gaussian", include_interactions = FALSE, name_control = "Control", name_fixed = "Fixed", name_free = "Free", name_interactions = "Interactions", boot_ci = FALSE, n_boot = 100, mc_cores = 1 )
response, free, fixed, control |
Character or character vectors with names
for each parameter. Used in |
data |
A |
family |
A string with default |
include_interactions |
A boolean with default |
name_free, name_fixed, name_control, name_interactions |
A string for type
of variable with defaults |
boot_ci |
A boolean with default |
n_boot |
A numeric with default |
mc_cores |
A numeric with default |
A residualrwa object with this structure:
a data.frame
with the consolidated sum of relative
weights according to each type of component; free, fixed, control and
interactions.
a data.frame
with the individual relative weights
for each variable. The data.frame
has columns: variable
,
weight
and type
. If boot_ci = TRUE
, two optional columns
ci_low
and ci_up
indicating the lower and upper confidence
intervals for each variable respectively.
a Glm
object with the final model used to
estimate the relative weights.
original data.frame
.
a list with character vectors free
, fixed
,
control
and interactions
with the final variables used in the
model.
a boolean indicating if the bootstrap procedure was used.
n <- 100 X1 <- rnorm(n) X2 <- rnorm(n) X3 <- rnorm(n) Y <- X2^3 + 10 * X1 * X2 data <- as.data.frame(cbind(Y, X1, X2, X3)) ex <- residualrwa( response = "Y", control = NULL, fixed = NULL, free = c("X1", "X2", "X3"), data = data, include_interactions = TRUE, boot_ci = TRUE, n_boot = 5 )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.