View source: R/plotModeration.r
plotModeration | R Documentation |
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
plotModeration(x, y, m, k = NULL, h = NULL)
x |
Predictor |
y |
Variable to predict |
m |
Moderator |
k |
Number of cases to create a windows |
h |
You could play with k and h parameters, until you have a good approximation to data
ggplot
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.