Skip to contents

Plot of residual structures classified by a Weighted Scale.

Usage

fn_fig_w(df, opacity, tint, my_labeller, order)

Arguments

df

A data frame contains the following variables: independent (x) and dependent (y) variables, the fitted variable (fitt), a weighted variable (wi), and additional details including the weights (wi), fitted values (fitt), residuals (ei), and the scale.

opacity

A numeric value for the alpha aesthetic used to control the transparency of elements in a plot.

tint

A vector that specifies the palette colors used to color the points.

my_labeller

Transforms objects to labeller functions. Used internally by labeller().

order

A vector determines the sequence of the plots.

Value

A customized multi-panel plot that uses a color scale for the residual points.

Details

The residual structure was analyzed by graphing residuals against weighted values. A custom multi-panel plot illustrates the structure of each fitted relationship, categorized by a color-weighted scale of values.

To standardize the x-axis units across different fitted models, a standardized residual distance, such as studentized residuals, can be used due to the varying dimensions of the variables.

Since the parameters contain subscripts, the labels were customized using the `ggplot2::as_labeller()` function and are stored in `my_labeller`.

See also

ggplot2::as_labeller()

ggplot2::facet_wrap

forcats::fct_relevel

Examples

 if (FALSE) { # \dontrun{

 p <- fn_fig_w(df, opacity,tint, my_labeller,
               order= X_names)
} # }