ch.moralsPlotFitsByGrps | R Documentation |
This function plots multiple model fits on one graph.
ch.moralsPlotFitsByGrps(df.models, xxyCols, xCol, data, filenameID = NULL)
df.models |
a models list containing: a dfIndex, created by ch.subsetDFbyGroups() and a series of model fits output by ch.getLmModel() or ch.getPhitModel(); |
xxyCols |
a vector of 1 or 2 strings that specifies the names of the column in "dfIndex" that contains the grouping variables (up to two). This is required. |
xCol |
a string that specifies the name of the column in "data" that contains the predictor (x) variables for the fit specified in the models. |
data |
the morals dataframe after running through ch.moralsDataPrep(). |
filenameID |
a string that will be put on all filenames when the plots are saved. DEFAULT = NULL (no file saved) |
.
ch.moralsXXYPlotFitsByGrp(df.models, "scenarioType", "agent", "overlapRound", moralsData)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.