plotModeration: Plot a moderation chart.

View source: R/plotModeration.r

plotModerationR Documentation

Plot a moderation chart.

Description

Moderation plot allows to evaluate if a moderation is lineal, polynomial or have another form. Two methods to calculate the moderation are used: - Windows: Windows of size k are taken from the sample and on each the regression is calculated - Kernel: A weigthed regression is calculated for each point, using a gaussian kernel, using the parameter h as bandwidth

Usage

plotModeration(x, y, m, k = NULL, h = NULL)

Arguments

x

Predictor

y

Variable to predict

m

Moderator

k

Number of cases to create a windows

h

Details

You could play with k and h parameters, until you have a good approximation to data

Value

ggplot


clbustos/rcebn documentation built on Feb. 2, 2024, 5:55 a.m.